You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex CLI pre-fills prompt with OSC palette reply on macOS Terminal #5107
Codex CLI version: 0.46.0 (binary installed via npm at /usr/lib/node_modules/@openai/codex).
SSH session using the default login shell (bash) with stock .bashrc.
Observed Result
Each time the Codex TUI finishes drawing (especially after Terminal regains focus), a line beginning with the palette response 10;rgb:ffff/ffff/
ffff11;rgb:2b5f/66a6/c977 appears in the input buffer. The Codex prompt is still there, but the reply from the terminal is pasted into the same line,
so the user has to manually delete it before typing a command.
Expected Result
Codex should consume the terminal’s OSC 10/11 response internally (or not request palette info unless it will handle the reply), leaving the user
prompt empty.
Notes
The string matches Apple Terminal’s OSC 10/11 color reply format (ESC]10;rgb:...BEL). It seems Codex sends the query but doesn’t discard the response,
so the raw text becomes user input.
The issue occurs even with default shell configuration; no prompt hooks are involved.
Other terminal emulators (e.g., iTerm2) may or may not echo the same response, but the bug is easiest to reproduce on the stock macOS Terminal.
Workaround Tried
Attempted to disable tui.apply_terminal_palette, but Codex still issued the OSC request.
Shell-level filters work but are intrusive, so a fix in the CLI would be preferable.
Activity
github-actions commentedon Oct 12, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
rewardhacker00 commentedon Oct 26, 2025
+1 also on linux
Git-on-my-level commentedon Oct 28, 2025
Previous discussion: #4945
Issue not fully resolved yet. I can still reproduce on v0.50.0
Running via code-server
nornagon-openai commentedon Oct 29, 2025
Duplicate of #4945