Skip to content

fix(headless): ask_user returns autonomous-proceed signal (not bare empty strings)#735

Merged
ericleepi314 merged 1 commit into
mainfrom
fix/headless-ask-user-autonomous
Jul 21, 2026
Merged

fix(headless): ask_user returns autonomous-proceed signal (not bare empty strings)#735
ericleepi314 merged 1 commit into
mainfrom
fix/headless-ask-user-autonomous

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Context

Follow-up to the AgentTimeoutError analysis 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-fitting revealed one concrete, fixable behavior: the agent called AskUserQuestion, the headless _noop_ask_user returned 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_user returns the autonomous-proceed message keyed per question
  • tests/test_headless_cli.py green
  • Interactive TUI path unchanged (still shows the real dialog; only the headless surface substitutes)

🤖 Generated with Claude Code

…, 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>
@ericleepi314
ericleepi314 merged commit f166227 into main Jul 21, 2026
2 checks passed
@ericleepi314
ericleepi314 deleted the fix/headless-ask-user-autonomous branch July 21, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant