Skip to content

fix(agents): deny native AskUserQuestion — it hangs unattended runs (v0.193.2)#325

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/ask-fix
Jul 14, 2026
Merged

fix(agents): deny native AskUserQuestion — it hangs unattended runs (v0.193.2)#325
vikasprogrammer merged 1 commit into
mainfrom
feat/ask-fix

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

Root cause (diagnosed live on instapods)

Asked to "ask a test question," the engineer agent called Claude's native AskUserQuestion tool, which renders an interactive multiple-choice picker in the terminal TUI:

❯ 1. Option A   2. Option B   3. Type something.   4. Chat about this
   Enter to select · ↑/↓ to navigate · Esc to cancel

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

  • Deny AskUserQuestion in terminal/claude-launch.sh (added to permissions.deny; deny rules apply even under --dangerously-skip-permissions, unlike allow).
  • Steer agents to ask_human in 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 AskUserQuestion would hang identically. Surfaced by the Chat work.

Verified

  • npm run typecheck + build ✓ · npm run test:governance → 68/68 ✓ · deny JSON shape validated
  • Live smoke on instapods to follow after merge: start "ask a test question" and confirm the agent asks via ask_human/prose (renders + answerable) instead of hanging.

🤖 Generated with Claude Code

…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>
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