fix(tmux): disallow AskUserQuestion in headless agents (#850, #876) - #879
Open
bradbrok wants to merge 1 commit into
Open
fix(tmux): disallow AskUserQuestion in headless agents (#850, #876)#879bradbrok wants to merge 1 commit into
bradbrok wants to merge 1 commit into
Conversation
CC 2.1.200 removed the auto-continue fallback for AskUserQuestion dialogs; headless tmux agents now hang indefinitely if the model calls it. Pass --disallowedTools AskUserQuestion on every tmux REPL launch to close this. The SDK path is already safe (AskUserQuestion is not in DEFAULT_STREAMING_ALLOWED_TOOLS). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMiF52XXdqSU7V5hJUovqQ
bradbrok
force-pushed
the
fix/disallow-ask-user-question-headless
branch
from
July 21, 2026 06:08
1c7c692 to
c5813c8
Compare
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
CC 2.1.200 (live on fleet since 2026-07-04) removed the
AskUserQuestionauto-continue fallback. Any headless tmux agent that calls it now hangs indefinitely — pane alive, transport CONNECTED, but zero API traffic — until the inflight watchdog force-restarts it 600 s later.The SDK path is already safe:
AskUserQuestionis not inDEFAULT_STREAMING_ALLOWED_TOOLS, so it can't be called there.The tmux path was unguarded:
_build_claude_cmdlaunchedclaude --dangerously-skip-permissionswith no--disallowedTools, leavingAskUserQuestionreachable.Fix
One line in
_build_claude_cmd: pass--disallowedTools AskUserQuestionon every tmux REPL launch.Test
329 tmux session tests pass.
Closes #850, closes #876.
Generated by Claude Code