Repository navigation
fix(agent-status): map codex request_user_input questions to Needs You - #9861
Merged
brennanb2025 merged 2 commits intoJul 22, 2026
Merged
Conversation
Codex 0.145 asks user questions via the auto-allowed request_user_input tool (experimental default_mode_request_user_input): PreToolUse fires while blocked on the answer with no Stop, so Orca showed the pane as working/idle instead of Needs You. Map that PreToolUse to waiting (mirrors grok's ask_user_question), exempt question waits from the codex yolo auto-approval suppressor, and deliver native-chat answers to the digit-commit selector by option number (typed labels are ignored and Enter commits the highlighted first option). Older codex versions emit no such event and are unchanged.
Contributor
📝 WalkthroughWalkthroughCodex 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 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 |
This was referenced Jul 27, 2026
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
stablyai#9861) * fix(agent-status): map codex request_user_input questions to waiting Codex 0.145 asks user questions via the auto-allowed request_user_input tool (experimental default_mode_request_user_input): PreToolUse fires while blocked on the answer with no Stop, so Orca showed the pane as working/idle instead of Needs You. Map that PreToolUse to waiting (mirrors grok's ask_user_question), exempt question waits from the codex yolo auto-approval suppressor, and deliver native-chat answers to the digit-commit selector by option number (typed labels are ignored and Enter commits the highlighted first option). Older codex versions emit no such event and are unchanged. * fix(native-chat): preserve codex question answer semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
User report: on the agent dashboard (and the worktree sidebar — both read the same signal), a codex agent asking a question shows Idle; only permission asks reach Needs You.
Investigated against real codex v0.145.0 with a raw hook-capture rig:
request_user_input(featuredefault_mode_request_user_input, flag name suggests it's headed for default-on). When the model asks a question, hooks emitPreToolUsewithtool_name: "request_user_input"and no Stop — the turn stays open while the TUI waits on the answer.normalizeCodexEventmapped every PreToolUse toworking, so the pane showed a spinner (decaying to Idle) while codex was actually blocked on the user.PostToolUse(with the answers) thenStop— captured live.Stop→ Done/Idle. There is no event to map; behavior is intentionally unchanged.Fix
normalizeCodexEvent:PreToolUsewhose tool is the question tool →waiting(exactly grok'sask_user_questionmapping).PostToolUse/Stopalready clear it.isAskUserQuestionToolnow also matchesrequest_user_input— this flows the questions JSON intointeractivePromptvia the existing codex extractor, so the sidebar amber row, dashboard Needs You card + question chip, and native-chat card all light up with no further changes.shouldSuppressCodexAutoApprovalStatus): Orca launches codex with--dangerously-bypass-approvals-and-sandbox, and that suppressor drops all codexwaiting/blockedstatuses as auto-approval artifacts — it would have eaten the question wait. Question waits are user-actionable (yolo never auto-answers them), so they now bypass the suppressor. Synthetic-title suppression is unchanged (titles can't distinguish question from permission).Blue+ Enter committed "Red (Recommended)" (the highlighted first option), the STA-1860 misdelivery shape. Codex now uses option digits for direct choices plus a Codex-specific sequence for multi-question, skipped, and free-text-note answers; this avoids Claude's trailing submit Enter after Codex has already closed the overlay. Desktop and mobile share the same builder. Grok keeps the pasted-label path.Version compatibility
waiting→ Needs You; answer →working→done. Verified live end-to-end.request_user_inputevents — identical to today (verified live: model reports the tool unavailable; plain-text question + Stop → Done).PermissionRequestwaits unchanged.Evidence (live QA, dev Orca + real codex v0.145.0, YOLO args + feature flag)
state: waiting,tool: request_user_input,interactivePrompt: {"questions":[...]}; cleared on answer;doneafter Stop. Repeated across 4 question rounds.registerAgentLaunchConfigpath, re-triggered a question — thewaitingstatus survived ingestion (pre-fix this exact configuration is dropped at theuseIpcEventssuppressor gate).2alone answered "Blue"; paste-path proof of misdelivery above.Tests
agent-hook-listener.test.ts: request_user_input lifecycle (waiting + interactivePrompt → working on answer → done), ordinary PreToolUse stays working.codex-auto-approval-notification-suppression.test.ts: question wait not suppressed under yolo attribution (permission waits still are).native-chat-agent-support/native-chat-interactive-prompt/ desktop and mobile send suites: codex takes its selector-specific path, emits no post-submit Enter for multi-question answers, attaches custom text as notes, and confirms partial answers; grok keeps pasted text.All: typecheck, oxlint (changed files), oxfmt, targeted vitest suites green. (
lint:switch-exhaustivenessis red on main inskill-freshness-group.tsx— pre-existing, unrelated.)Not covered / notes