Repository navigation
Conversation
…ne's leaf (STA-9655) The blocked-text scan is throttled, so a dialog whose last bytes arrive within 50 ms of a previous scan is stamped on a trailing-edge timer. That stamp went only to the PTY record: its mirroring leaves had already copied the old value, and a pane-backed wait reads the leaf's. The permission arbiter therefore saw the hook's `done` as the newest event and let tui-idle settle ready over Codex's "Implement this plan?" menu, which Codex paints after its Stop hook. The trailing-edge stamp now reaches the leaves that mirror the PTY's tail, and a status snapshot runs a pending scan first, so a wait issued inside the throttle window judges the menu too. Replayed against the 0.160.0 capture.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe runtime adds an immediate flush for pending blocked checks and stamps matching PTY leaves when it detects a new blocked reason. Terminal status snapshots flush pending stamps before reading terminal state. New tests cover a displayed Codex plan menu and quoted menu text. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change makes the TUI-idle wait report the Codex plan menu as blocked instead of ready. No actionable merge-blocking risk was identified in the supplied changes. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
…r its Stop hook (#33335) Keep tui-idle blocked when Codex paints its plan menu after the Stop hook. Fixes #25912 Supersedes #26492 Co-authored-by: Jinwoo Hong <[email protected]>
ELI5
When Codex finishes a plan, it shows a menu asking "Implement this plan?". Orca was supposed to report "waiting on a menu" there, but said "ready" instead, so the next message picked a menu option. Orca saw the menu but filed that observation where window-backed terminals don't look. Now it records it in both places, and anything reading the status first catches up on a check that hadn't run yet.
What Changed
terminal wait --for tui-idlereturnedsatisfied: truein about 0.1 s, with noblockedReason.satisfied: false,blockedReason: agent-interactive-prompt, and settles ready once the menu is answered.Mechanism (traced by replaying the real Codex 0.160 bytes through the runtime):
Why
Linked Issue
Fixes #25912
Visual Proof
N/A: no UI change. This changes a readiness wait's result; evidence is under Testing.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New test (
tui-idle-codex-plan-menu.test.ts), replaying the captured Codex 0.160 menu bytes through the runtime:3returns the composer: ready.expected 'ready' to be 'blocked:agent-interactive-prompt'). Stamping the pane copy alone was not enough; the pending-scan flush is needed too.Live run (macOS, isolated background dev runtime, codex 0.161):
/planturn ended in the menu. The hook store had Codex's Stop, and the wait at the menu was blocked; after answering3it was ready.Checks:
pnpm tcandcheck:code-quality:changedare clean, and 28 related suites pass.Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)