Skip to content

Using Codex in Tmux

AlexLarra edited this page Jun 3, 2025 · 3 revisions

If you use tmux it may not pick up the API key correctly, make sure your OPENAI_API_KEY is forwarded into new tmux sessions. In that case add the following to your ~/.tmux.conf:

# Forward OPENAI_API_KEY into tmux sessions
set -g update-environment "OPENAI_API_KEY"
set-environment -g OPENAI_API_KEY "#{ENV:OPENAI_API_KEY}"

Clone this wiki locally