fix(headless): ask_user returns autonomous-proceed signal (not bare empty strings)#735
Merged
Merged
Conversation
…, not bare empty strings In non-interactive mode there is no user to answer AskUserQuestion. The prior _noop_ask_user collapsed every question to "" — which gave the model no signal about WHY the answer was empty. Observed live (terminal-bench raman-fitting, clawcodex opus run): the agent asked two clarifying questions, got empty answers, then flailed through 23 curve-fit attempts and hit the agent timeout instead of committing to an approach. Return an explicit "no interactive user is available; proceed autonomously with your best judgment; do not ask again" answer so the model moves on decisively. Scope note: this is a headless-decisiveness quality fix, NOT a cure for AgentTimeoutError broadly — analysis of the opus run shows 7/9 timeouts are task-inherent (the same genuinely-long tasks — CompCert compile, QEMU boots, fasttext training, with 2400-3600s per-task timeouts — also time out under claude-code; counts 9 vs 10 are at parity). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Context
Follow-up to the
AgentTimeoutErroranalysis on the clawcodex opus run (0.58) vs claude-code (0.72). Key finding: AgentTimeoutError is overwhelmingly task-inherent, not a clawcodex bug — 7 of 9 clawcodex timeouts also time out under claude-code (the same genuinely-long tasks: CompCert compile, DOOM-for-MIPS, QEMU boots, fasttext training — which carry 2400–3600s per-task timeouts), counts are at parity (9 vs 10), and claude-code times out on 3 tasks clawcodex completes. AgentTimeout was not a driver of the score gap (that was the 18 watchdog crashes, fixed in #734).This change
Of the 2 clawcodex-specific timeouts,
raman-fittingrevealed one concrete, fixable behavior: the agent calledAskUserQuestion, the headless_noop_ask_userreturned bare empty strings, and the model — with no signal about why the answers were empty — flailed through 23 curve-fit attempts and timed out. This returns an explicit "no interactive user is available; proceed autonomously with your best judgment; do not ask again" answer so the model commits to an approach instead of re-asking.This is a headless-decisiveness quality fix; it is not claimed to fix AgentTimeout broadly (see finding above).
Test plan
_noop_ask_userreturns the autonomous-proceed message keyed per questiontests/test_headless_cli.pygreen🤖 Generated with Claude Code