[BUG] Prompt-type hooks fail on Vertex AI with "output_config: Extra inputs are not permitted"
Status Fixed / completed
Reported on v2.1.81
Maintainer reply ✓ Yes — mhegazy
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Mar 23, 2026 · closed Apr 27, 2026
💡 Likely answer: A maintainer (mhegazy, contributor)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Prompt-type hooks ("type": "prompt") fail on Vertex AI. Claude Code sends an output_config parameter that the Vertex AI API does not support.
Environment: Claude Code v2.1.81, Vertex AI
What Should Happen?
The prompt-based hook should run successfully on Vertex AI API.
Error Messages/Logs
[DEBUG] Hooks: Processing prompt hook with prompt: Summarize what this command did: {"session_id":"...","tool_name":"Bash","tool_input":{"command":"ls ..."},...}
[DEBUG] Hooks: Querying model with 1 messages
[ERROR] API error (attempt 1/11): 400 {"type":"error","error":{"type":"invalid_request_error","message":"output_config: Extra inputs are not permitted"}}
[DEBUG] Hooks: Model response: API Error: 400 ...
[DEBUG] Hooks: error parsing response as JSON: API Error: 400 ...
Steps to Reproduce
- Configure Claude Code to use Vertex AI (
CLAUDE_CODE_USE_VERTEX=1) - Add a prompt-type hook to .claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "prompt",
"prompt": "Summarize what this command did: $ARGUMENTS",
"statusMessage": "Analyzing..."
}
]
}
]
}
}
- Run Claude Code with
--debug - Ask Claude to run any command (e.g.,
ls) - Observe the hook error in the debug log
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81 (Claude Code)
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
5 Comments
This is the same
output_configissue as #41149. Vertex AI'sstreamRawPredictendpoint rejects the parameter.Command hooks (
type: command) run as shell scripts and don't make API calls, so they work regardless of backend. Prompt hooks (type: prompt) make a separate API call to the model, which is where theoutput_configincompatibility hits.If you specifically need model-powered analysis in your hooks, you can call the API directly from a command hook:
Still a bug in 2.1.114. Changing to command type happens to be OK in my current scenario.
Still hitting this on Vertex AI. Converting to command hooks isn't a realistic workaround for us — we manage hook config centrally across 40+ repos, and prompt hooks work great for that since it's just JSON.
Command hooks would mean distributing and maintaining scripts in every repo. Would appreciate a proper fix for this.
Should be fixed in next release
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.