fix(agents): deny native AskUserQuestion — it hangs unattended runs (v0.193.2)#325
Merged
Conversation
6d5b7a5 to
62f01f9
Compare
…v0.193.2) Claude's built-in AskUserQuestion renders a multiple-choice picker in the TUI and blocks the turn until a keypress — but Agent OS runs have no human at the terminal, so it hangs forever (no output, nothing in the Inbox, stuck pane), and in the Chat surface it looked like the ask tool "wasn't rendering." The launcher now denies AskUserQuestion (applies even under --dangerously-skip-permissions) and the operating notes steer agents to ask_human (Inbox card + DM, blocks for the reply) or plain prose — both work in every surface. Latent bug for all unattended runs, surfaced by the Chat work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62f01f9 to
b0f182c
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.
Root cause (diagnosed live on instapods)
Asked to "ask a test question," the engineer agent called Claude's native
AskUserQuestiontool, which renders an interactive multiple-choice picker in the terminal TUI:An Agent OS run has no human at the terminal (chat/automation/task/Slack are unattended). So the turn blocks forever waiting for a keypress: no assistant output (→ nothing in
/conversation), and the native tool never touches the Inbox (→ nothing for the chat's question card to render). It looked like the "ask tool wasn't rendering"; really the agent picked a TUI-only tool incompatible with a governed/remote session. Confirmed by capturing the live pane stuck on the picker — and stuck panes were piling up.Fix
AskUserQuestioninterminal/claude-launch.sh(added topermissions.deny; deny rules apply even under--dangerously-skip-permissions, unlikeallow).ask_humanin the operating notes — the governed equivalent that posts an Inbox card + DM, blocks for the reply, and renders as an answerable card in Chat. Plain-text questions also work (a normal chat bubble).This is a latent bug for every unattended run, not just Chat — any automation/task/Slack agent that reached for
AskUserQuestionwould hang identically. Surfaced by the Chat work.Verified
npm run typecheck+ build ✓ ·npm run test:governance→ 68/68 ✓ · deny JSON shape validatedask_human/prose (renders + answerable) instead of hanging.🤖 Generated with Claude Code