From c5813c87d17f4261bd12019c259efaf1586e5950 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 06:09:22 +0000 Subject: [PATCH] fix(tmux): disallow AskUserQuestion in headless agents (#850, #876) 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 Claude-Session: https://claude.ai/code/session_01GMiF52XXdqSU7V5hJUovqQ --- src/pinky_daemon/tmux_session.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pinky_daemon/tmux_session.py b/src/pinky_daemon/tmux_session.py index 0fd9a633..2726c72c 100644 --- a/src/pinky_daemon/tmux_session.py +++ b/src/pinky_daemon/tmux_session.py @@ -2927,6 +2927,10 @@ def _build_claude_cmd(self) -> str: if cli_effort and cli_effort != "auto": parts.extend(["--effort", cli_effort]) + # CC 2.1.200 removed AskUserQuestion's auto-continue fallback; headless + # agents now hang indefinitely if the model calls it (#850, #876). + parts.extend(["--disallowedTools", "AskUserQuestion"]) + # Claude Code 2.1.215 does not reliably discover project or local-scope # MCP configuration when the daemon launches its tmux REPL. Pass the # agent workspace config explicitly when present so both fresh and