Plan · decision needed · ox CLI
ox codex: the ox status line inside the Codex terminal
Codex gives other programs nowhere to draw. A working prototype gets around that by starting Codex through ox, which keeps the terminal's bottom row for the ox status line and a live flow lane. The question is whether to ship it, and how people opt in and out.
Decision
Decide: ship ox codex as an opt-in way to launch Codex with an ox row, or keep Codex on still lanes in the transcript only.
Recommendation: ship it opt-in and labelled experimental. It never changes what plain codex does unless the person says yes.
ProblemNo surface in Codex
Codex's status line takes built-in items only, and a hook's message is printed once and can't move. Three experiments confirmed it.
ApproachWrap, don't inject
ox starts Codex one row shorter and draws its own bottom row: status line plus the latest ox call's lane, animated.
CostAbout 2 to 3 days
The core works today. Remaining: a proper command, off switches, doctor setup, hardening, docs.
Biggest riskWe sit in the display path
ox relays everything Codex draws. A Codex release that draws differently could cause glitches until ox is patched.
What a person sees
Idleox call runningLandingSettled › Tell me about last week's meetings • Ran ox conversation search --since 2026-11-09 --limit 50 └ 50 shown · 76 searched › Ask Codex to do anything GPT-5.6 medium · ~/sageox-monorepo · Summarize last week's meetings ● ox 1 plan ● rec● ox 1 plan ● rec SAGEOX ●┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄○ SESSION reading discussion● ox 1 plan ● rec SAGEOX ●━━━━━━•━•━•━━━━━● SESSION read discussion · ~6.3k · 0.2s● ox 1 plan ● rec SAGEOX ●━━━━━━━━━━━━━━━━● SESSION read discussion · ~6.3k · 0.2s
The bottom line belongs to ox. Everything above it is Codex, unchanged apart from being one row shorter.
What is already true
- Works on a real session: seen running on Codex 0.169 in Ghostty, with the row showing.
- Not yet seen: the lane animating on the row in a real session, window resizing, long sessions.
- One bug found and fixed: ox passed its own no-colour setting to Codex, which stripped Codex's colours.
- Nothing is committed. The prototype is a flag on a hidden command on one branch.
How it works
ox becomes the program the terminal talks to. Codex runs inside it and believes the terminal is one row shorter.
The three rules that keep it safe
| Rule | Why it matters | Status |
|---|---|---|
| Codex can never scroll or reset over ox's row | Otherwise a stray ox line lands in the scrollback on every screenful. | built, tested |
| ox draws only when Codex is between redraws | Writing mid-redraw would corrupt the screen. | built needs soak |
| The row follows the session in its own terminal | Two Codex terminals in one repo must not show each other's counts. | built, tested |
Where it applies
| Where Codex runs | ox row | What they get instead |
|---|---|---|
| Codex CLI, macOS or Linux | yes | Also keeps the still lanes in the transcript unless hidden. |
| Codex CLI, Windows | no | ox codex just runs Codex. Still lanes in the transcript. |
| ChatGPT desktop app, VS Code extension | no | No terminal to wrap. Still lanes in the transcript. |
| Codex inside Conductor | no | Conductor's Run pane already runs ox statusline --watch. |
Turning it off
Four switches, from "just this once" to "remove it from my machine". Each is independent, and none needs a restart of anything but Codex.
this one runcommand codexOr the full path to Codex. Bypasses the alias for a single launch. Nothing to undo. the lane onlyox config set flow_lanes offThe row keeps the status line and drops the moving lane. Also hides the still lanes in the Codex transcript. the whole rowox config set statusline offox codex then starts Codex directly, with no wrapper at all. This is the existing status line switch; it turns off the Claude Code line too. the Codex row onlyox config set codex_row offNew setting. Keeps the ox line everywhere else. ox codex becomes a plain pass-through. remove the setupox doctor --fixAfter codex_row off, doctor offers to delete the marked alias block it added. Deleting the two lines by hand does the same.
What each switch leaves on
| Switch | Bottom row | Lane on the row | Lanes in transcript | Wrapper running |
|---|---|---|---|---|
| Default | on | on | on | yes |
flow_lanes off | on | off | off | yes |
codex_row off | off | off | on | no |
statusline off | off | off | off | no |
If it ever misbehaves mid-session: quitting Codex gives the terminal back. Settings are read at launch, so a switch takes effect on the next start, not in a running session.
Open choice: whether codex_row deserves its own setting or statusline off is enough. A separate setting costs one more knob; without it, someone who wants the Claude line but not the Codex row has no way to say so.
Setup and consent
The one step ox cannot remove: Codex must be started through ox. The plan makes that step one line, and never takes it without asking.
| Moment | What ox does | Touches your files? |
|---|---|---|
| First Codex session started without the wrapper | Session-start hook shows a one-time tip: "run ox codex to see the ox line here". | no |
ox doctor | Reports "Codex status row not set up" with the exact line and the file it belongs in. | no |
ox doctor --fix | Shows the line, asks, then writes it inside a marked block in the shell profile. | only on yes |
ox upgrade | Nothing. The alias calls ox codex, so upgrades improve it without touching the profile. | no |
ox init | Mentions ox codex in its Codex next-steps. No edit. | no |
Why not automatic
- It can collide. Some people already define their own
codexfunction. A blind alias would override it. Doctor will detect an existing definition and print the line instead of writing. - Shells differ. zsh, bash and fish use different files and syntax. First version writes for zsh and bash and prints instructions for others.
- It redirects another vendor's command. Fine with consent, presumptuous without.
ox has never edited a shell profile before; today doctor only prints the line when ox is off the PATH. Writing on an explicit yes is a new precedent and is the part most worth a second opinion.
Is it worth it
ForThe only route
Every in-Codex option was tested and ruled out: static notices, the running-hook label, the built-in status line.
ForParity with Claude
Codex users get a persistent ox line and motion, the two things they have never had.
AgainstOngoing upkeep
ox owns a terminal relay. Each Codex release is a chance for a display quirk that lands on us.
AgainstPartial reach
No Windows, no desktop app, no VS Code. Only people who launch Codex CLI through ox.
Risks
| Risk | Likelihood | If it happens | Mitigation |
|---|---|---|---|
| Codex changes how it draws and the row glitches | medium | Flicker or a misplaced row until patched | Opt-in; one command to bypass; ship labelled experimental |
| Wrapper crash takes the Codex session with it | low | Lost in-progress turn | Keep the relay tiny; fail open to a direct launch at startup |
| Row drawn in the middle of a Codex redraw | low | Brief visual corruption | Draw only after output goes quiet; soak test long sessions |
| Alias fights a person's own shell setup | medium | Their custom codex stops working | Detect existing definitions; never write without a yes |
| Added keystroke or output latency | low | Codex feels slower | Pass-through is a byte copy; measure before release |
Alternatives
| Option | Persistent line | Motion | Setup | Upkeep |
|---|---|---|---|---|
| ox codex wrapper (this plan) | yes | yes | one line, once | medium |
| Still lanes in the transcript (built) | no | no | none | low |
ox statusline --watch in a split (built) | yes | yes | open a pane each time | low |
| Wait for OpenAI to allow a status line command | yes | unknown | none | none, but no date; requests are open |
A cheap way to decide: ship it hidden, use it on the team for a week across a Codex update, and count the glitches. That costs half a day and answers the upkeep question with evidence.
Build notes
For whoever implements it. The approver can skip this tab.
Steps
- Command. Add
ox codex [args…]: find the real Codex on PATH (skipping itself and shell functions), pass all arguments through, return Codex's exit code. Keepox statusline --wrap -- <cmd>as the generic form. - Off switches. At launch:
statusline offorcodex_row offexecs Codex directly;flow_lanes offkeeps the row without the lane. Non-terminal or Windows: direct launch. - Transcript lanes under the wrapper. Hooks already know they are inside the wrapper (the session-file variable). Suppress the per-call transcript lane there so a call is not shown twice.
- Doctor. New check, confirm-level fix, marked block
# >>> ox codex >>>…# <<< ox codex <<<; detect an existingcodexalias or function and print instead of write; removal when the setting is off. - Hardening. Resize, Codex full-screen views, very long sessions, paste of large input, suspend and resume (Ctrl-Z), terminal without colour.
- Docs and release note. Codex guide section,
ox codex --help, component note under the flow-lane spec.
Implementation notes
cmd/ox/statusline_wrap.go: output filter, row layout, session file between hook and wrapper.cmd/ox/statusline_wrap_unix.go,…_windows.go: the pseudo-terminal relay and the Windows pass-through.cmd/ox/statusline_watch.go: builds the status line and lanes the row shows.internal/flowlane: draws a lane; shared with the Claude Code plugin's terminal lane.cmd/ox/agent_hook.go: every hook reports its session to the wrapper when wrapped.
Verification
- Unit: filter keeps Codex off the row, including sequences split across reads; row never exceeds terminal width; hook writes only the wrapper's own file.
- Simulated terminal: Codex wrapped emits the same colours as unwrapped (this caught the no-colour bug).
- Real: one week of team use across at least one Codex update; resize and long-session checks by hand.
- Red-first for the customer claim: remove the row draw, confirm the end-to-end test fails on "the row shows this session's line".
Not in this plan
- The Claude Code terminal lanes and Codex transcript lanes, already built on this branch.
- The
bd primesession-start error in Codex, which is separate. - Wrapping other terminal apps. The wrapper is generic, but only Codex is in scope.

