032. The Claude question hooks carry the question and the options
- Date
- 2026-10-30
- Agents
- Claude Code
- Measured on
- real machine
Measured
2026-10-30, Claude Code 2.1.314 with --model haiku and
--permission-mode default (the question) or --permission-mode plan
(the plan), on Linux (Debian 13, x64), in a private tmux server with a
throwaway HOME. The scenarios scenarios/claude/dialog-states.sh (three
runs) and scenarios/claude/plan-and-resume.sh (one run) recorded every
hook payload. The scenarios print only the keys and the shape of
tool_input.
Measured on: real machine.
What was measured
-
The prompt "Ask me with your question tool whether I prefer red or blue, then reply with my answer." opened this dialog:
☐ Color Do you prefer red or blue? ❯ 1. Red You prefer red. 2. Blue You prefer blue. 3. Type something. ──────────────────────────── 4. Chat about this Enter to select · ↑/↓ to navigate · Esc to cancel -
The hooks for the question fired in this order:
PreToolUse,PermissionRequest,Notification(notification_type: permission_prompt), and after "1."PostToolUse, thenStop. -
PreToolUseandPermissionRequesthavetool_name: AskUserQuestionand atool_inputof this shape:{"questions": [{"question": str, "header": str, "options": [{"label": str, "description": str}, ...], "multiSelect": bool}]}In each run there was one question with two options.
questionwas the dialog line "Do you prefer red or blue?",headerwas "Color", and the labels were "Red" and "Blue", each with its description line.PermissionRequesthas nopermission_suggestionsfor this tool. -
The rows "3. Type something." and "4. Chat about this" are not in
tool_input. Claude Code adds them. Two options intool_inputgave four numbered rows on the screen. -
The
PostToolUsetool_inputandtool_responsehave the samequestions, and alsoanswersandannotations.answersmaps the question text to the label of the answer. -
A single question with a digit answer opened no review screen. The digit "1" closed the dialog at once (fact 004).
-
The plan approval. In plan mode the agent wrote the plan file with the
Writetool, and then calledExitPlanMode. The hooks werePreToolUse,PermissionRequestandNotification(permission_prompt). Thetool_inputkeys wereplan(the plan text) andplanFilePath(~/.claude/plans/<name>.md).PermissionRequesthad nopermission_suggestions. The dialog was:Claude has written up a plan and is ready to execute. Would you like to proceed? ❯ 1. Yes, and use auto mode 2. Yes, manually approve edits 3. Tell Claude what to change shift+tab to approve with this feedbackAfter "1.",
PostToolUsehad an emptytool_inputand atool_responsewithplan,isAgentandfilePath. Thepermission_modeof the next hooks wasauto.
Mechanism
A reader can build a structured record of a question from PreToolUse or
PermissionRequest with no screen parse: the question, the header, the
labels, the descriptions, and multiSelect. It must add the two rows that
Claude Code draws: a free-text row and "Chat about this". In the measured
dialog, the digit of option N of tool_input was N.
For a plan approval the hooks give the plan text, not the option labels. The labels come only from the screen.
Incident
None. tg-bridge asked for a structured record of a dialog with its options.
Screens
None.
Not measured
- A question with
multiSelect: true, and a wizard of more than one question in 2.1.314. - An answer with "Type something." or "Chat about this", and Esc on the question.
- Answers "2." and "3." on the plan approval.
- Other models, macOS and Windows.