PreToolUse hook causes AskUserQuestion tool to return empty responses
Description
When a PreToolUse hook is configured in .claude/settings.local.json, the AskUserQuestion tool returns empty responses. The user selections are not captured, and the tool result shows empty answers.
Environment
- OS: macOS (Darwin 24.6.0)
- Claude Code: Latest version
Steps to Reproduce
- Configure a PreToolUse hook in
.claude/settings.local.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node .claude/hooks/pre-tool-use.js",
"timeout": 5
}
]
}
]
}
}
- Use a slash command or prompt that triggers
AskUserQuestiontool - Select an option in the presented question
- Observe that the response comes back empty
Expected Behavior
AskUserQuestion should capture user selections and return them properly, regardless of PreToolUse hook configuration.
Actual Behavior
When PreToolUse hook is enabled:
AskUserQuestiondisplays options correctly- User can select an option
- But the tool result returns empty (no answer captured)
- Claude proceeds as if no selection was made
Workaround
Removing the PreToolUse hook from settings resolves the issue:
{
"hooks": {
"UserPromptSubmit": [...], // Works fine
"PostToolUse": [...] // Works fine
// PreToolUse removed
}
}
Additional Testing
| Hook Configuration | AskUserQuestion |
|-------------------|-----------------|
| PreToolUse only | ❌ Empty response |
| UserPromptSubmit only | ✅ Works |
| PostToolUse only | ✅ Works |
| UserPromptSubmit + PostToolUse | ✅ Works |
| PreToolUse + UserPromptSubmit | ❌ Empty response |
Hypothesis
There may be a stdin/stdout conflict between the PreToolUse hook's JSON processing and AskUserQuestion's interactive input handling.
4 Comments
it reacts like this below.
User answered Claude's questions:
⎿
And then It seemed it choose one of the choices without my permission.
This appears to be the same issue as #12031.
I can confirm this bug is resolved in Claude Code version 2.0.76.
Validated on January 3-4, 2026 with 17 active PreToolUse hooks - all test cases (single select, multi-select, custom "Other" input) now return answer data correctly.
If you're still experiencing empty responses, please verify you're on version 2.0.76 or later (
claude --version).Thanks @kitaekatt
It's fixed, I tested with the same condition that caused the bug.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.