Repository navigation
Conversation
Codex paints its `OpenAI Codex` header with `model: loading` and `directory: loading` before the composer takes input. The ready-prompt detector only checked that both labels were present, so `terminal wait --for tui-idle` resolved mid-boot and worker-start pasted its preamble onto the splash screen, where it landed scrambled or parked unsubmitted (stablyai#15581, stablyai#16377, stablyai#17066 family). Only a header whose model and directory values are settled counts now, reading the last painted row so a stacked repaint of the settled header wins over the booting one above it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughCodex readiness detection now reads the latest Merge Risk: 🟡 Moderate · up to The PR tightens Codex startup detection, but the current matching can still mistake a 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: bad3d751-4295-4cfa-9e12-348335290d8a
📒 Files selected for processing (2)
src/main/runtime/terminal-wait-codex-ready-header.test.tssrc/main/runtime/terminal-wait-detection.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ Minor suggestion only — the fix is correct and well-scoped; one coverage gap inline.
Reviewed changes
findCodexReadyPromptIndexnow reads settled values — the Codex readiness check parses the value after the lastmodel:/directory:label in the retained tail and rejects the header while either is empty or starts withloading, rather than matching on the bare labels.- New regression test —
terminal-wait-codex-ready-header.test.tspins three behaviors: a booting header times outtui-idle, a settled header resolves it, and empty values time out.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review follow-up: `lastIndexOf('model:')` matched the label inside a
directory value such as `/tmp/model:settled`, which could pass a booting
header as settled. The fields are now located line-anchored, still taking
the last row painted, and the single-banner stacked repaint that motivated
the last-row rule has its own test. The Codex header detector moves to
codex-ready-header.ts to keep terminal-wait-detection.ts under the
max-lines budget.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Extracted
findCodexReadyPromptIndexintocodex-ready-header.ts— the Codex readiness matcher now lives in a dedicated module imported byterminal-wait-detection.ts. - Line-anchored label matching —
findLastCodexHeaderFieldIndexfinds the lastmodel:/directory:row (after leading whitespace), so a directory value like/tmp/model:settledis no longer misread as the model row while the last-painted settled row still wins a stacked repaint. - Two new regression tests — one pins the single-banner stacked repaint resolving
tui-idle; the other pins that amodel:inside a directory value does not satisfy readiness.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Closing as superseded. The function this PR changed ( |

ELI5
When Codex starts, it prints its banner with
model: loadinganddirectory: loadingfor a few seconds before it can take input. Orca's "is this TUI idle?" check only looked for the wordsmodel:anddirectory:, so it answered "yes" while Codex was still booting.worker-startthen pasted the task onto the splash screen. Now the check only says "ready" once both values have actually arrived.What Changed
src/main/runtime/terminal-wait-detection.ts:findCodexReadyPromptIndexreads the value after the lastmodel:anddirectory:labels in the tail and rejects the header while either is empty or starts withloading. It uses the last occurrence so a stacked repaint of the settled header wins over the booting one above it.src/main/runtime/terminal-wait-codex-ready-header.test.ts(new):tui-idletimes out on the booting header, resolves once the values are settled, and times out while the values have not arrived yet.Why
Measured on 2026-09-01 (Orca 1.4.194, Windows 11, 16 fresh
worker-start --agent codex): 3 of 16 dispatches stalled. In the first one the dispatch receipt showedstage=dispatch_input,terminal readshowed Codex still atmodel: loading / directory: loading, and the preamble text was scrambled across the boot screen.worker-startgates the paste onruntime.waitForTerminal(tui-idle), and that gate is satisfied byisKnownReadyPromptPreview, which for Codex only required the two labels to be present. This is the readiness half of the stall family in #15581 (closed, regressed) and #16377; the submit half is handled in a separate PR (agent-prompt composer observation).Linked Issue
Refs #15581, #16377, #17066. Same boot race as #13439 (paste while Codex loads MCP) and the
tui-idlefalse positive family in #9976, both of which predate this detector.Visual Proof
N/A — no UI or interaction change. The observable difference is
orca terminal wait --for tui-idleno longer resolving while the Codex header still readsloading.Testing
Not tested against a live Codex boot in this session; the header shape in the tests is the one observed in the field report above and in the existing
Codex ready prompt previewfixture. Ran on Windows 11:AI Disclosure
Written with Claude Code (Claude Fable 5.1) under direction of @Tauri-EPO, who supplied the field measurements and reviewed the diff.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Pure string matching on the retained tail; no platform, SSH, mobile or wire impact. A Codex build that never prints
loadingbehaves exactly as before.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) —tc:node, targeted tests and oxlint on changed files pass locally; full lint/build left to CI🤖 Generated with Claude Code