Emit OSC 9;4 progress reports so terminals can surface working/idle state
What variant of Codex are you using?
CLI
What feature would you like to see?
Emit ConEmu-style OSC 9;4 progress sequences from the TUI so terminals and
terminal-hosting apps can tell whether Codex is working without the pane being
visible:
ESC ] 9 ; 4 ; 3 BEL(\x1b]9;4;3\x07, indeterminate) when a turn startsESC ] 9 ; 4 ; 0 BEL(\x1b]9;4;0\x07, remove) when the turn ends and Codex
is waiting for user input
- optionally state
2(error) when a turn fails
Windows Terminal, ConEmu, and Ghostty render this natively as a tab spinner /
taskbar progress indicator, and terminals without support ignore the sequence
silently. Claude Code and Kimi CLI already emit these sequences when the
terminal advertises support (e.g. TERM_PROGRAM=ghostty), so there is
precedent among peer agent CLIs. Emission could be gated the same way the
existing terminal-title logic is (IsTerminal + a tui config flag).
The mapping is intentionally minimal: indeterminate while the LLM is working,
remove when waiting for input. Approval prompts / questions should read as
waiting (remove), since the point is "safe to look away" vs. "needs me".
Additional information
Unlike the existing OSC 0 /title support, OSC 9;4 is a machine-readable
state channel (working / idle / error, optional percentage) that terminals
render as chrome (tab spinner, taskbar progress) and hosting apps can parse
programmatically — a title is a freeform string that can't be consumed
reliably. And unlike OSC 21337 (#25879, which proposes the same visibility
goal via iTerm2's protocol), OSC 9;4 is already a cross-terminal convention:
https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
Context: I build a terminal workspace that hosts coding agents in PTYs and
parses OSC 9;4 to drive per-pane working indicators and notifications. In an
Aug 2026 pilot, Claude Code 2.1.220 and Kimi CLI 0.31.1 emit progress
reports; Codex CLI 0.146.0 emits none in any configuration I tested.
---
This issue was posted with the help of AI agents, with human intention.