claude-code - 💡(How to fix) Fix PostToolUse prompt hooks fail on Vertex AI backend with 'output_config: Extra inputs are not permitted' [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54224Fetched 2026-04-29 06:32:59
View on GitHub
Comments
2
Participants
2
Timeline
9
Reactions
0
Timeline (top)
labeled ×6commented ×2closed ×1

Plugin PostToolUse hooks with "type": "prompt" fail on the Vertex AI backend. The hook matches correctly and fires, but the prompt evaluation API call returns a 400 error.

Error Message

PostToolUse:mcp__github__issue_write hook error
Hook evaluator API error: API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"output_config: Extra inputs are not permitted"}}

The request ID prefix req_vrtx_ confirms this is a Vertex AI backend call.

Root Cause

Plugin PostToolUse hooks with "type": "prompt" fail on the Vertex AI backend. The hook matches correctly and fires, but the prompt evaluation API call returns a 400 error.

Code Example

PostToolUse:mcp__github__issue_write hook error
Hook evaluator API error: API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"output_config: Extra inputs are not permitted"}}

---

{
    "name": "my-plugin",
    "hooks": {
        "PostToolUse": [
            {
                "matcher": "mcp__github__issue_write",
                "hooks": [
                    {
                        "type": "prompt",
                        "prompt": "An issue was just created. Do something with it."
                    }
                ]
            }
        ]
    }
}
RAW_BUFFERClick to expand / collapse

Description

Plugin PostToolUse hooks with "type": "prompt" fail on the Vertex AI backend. The hook matches correctly and fires, but the prompt evaluation API call returns a 400 error.

Error

PostToolUse:mcp__github__issue_write hook error
Hook evaluator API error: API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"output_config: Extra inputs are not permitted"}}

The request ID prefix req_vrtx_ confirms this is a Vertex AI backend call.

Reproduction

  1. Create a plugin with a PostToolUse prompt hook in .claude-plugin/plugin.json:
{
    "name": "my-plugin",
    "hooks": {
        "PostToolUse": [
            {
                "matcher": "mcp__github__issue_write",
                "hooks": [
                    {
                        "type": "prompt",
                        "prompt": "An issue was just created. Do something with it."
                    }
                ]
            }
        ]
    }
}
  1. Launch Claude Code with --plugin-dir /path/to/plugin
  2. Call mcp__github__issue_write (or any tool matching the matcher)
  3. Observe: the hook fires but fails with the output_config error

Expected behavior

The prompt hook should evaluate successfully regardless of the API backend (direct Anthropic API, Vertex AI, Bedrock).

Environment

  • Claude Code version: 2.1.121
  • Backend: Vertex AI (Google Cloud)
  • OS: Linux (Fedora 43)
  • Plugin loaded via: --plugin-dir

Notes

  • The hook does fire — the matcher and plugin loading work correctly
  • The error appears to be in the hook evaluator's API call, which sends an output_config parameter that Vertex AI rejects
  • Non-prompt hook types (e.g., "type": "command") were not tested

extent analysis

TL;DR

Remove or modify the output_config parameter in the hook evaluator's API call to resolve the 400 error with Vertex AI.

Guidance

  • Verify that the output_config parameter is indeed the cause of the error by checking the API documentation for Vertex AI and the hook evaluator's implementation.
  • Check the plugin configuration and hook definition to ensure that no extra inputs are being sent in the API call.
  • Consider modifying the plugin to handle different API backends (e.g., Vertex AI, Anthropic API, Bedrock) and their respective requirements for the output_config parameter.
  • Test non-prompt hook types (e.g., "type": "command") to see if they exhibit the same behavior.

Example

No code snippet is provided as the issue is related to the API call and parameter configuration, which is not explicitly shown in the provided code.

Notes

The solution may require modifications to the plugin or the hook evaluator's implementation to handle the differences in API requirements between Vertex AI and other backends.

Recommendation

Apply a workaround by modifying the plugin or hook evaluator to remove or modify the output_config parameter for Vertex AI backend calls, as the error message suggests that this parameter is not permitted.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The prompt hook should evaluate successfully regardless of the API backend (direct Anthropic API, Vertex AI, Bedrock).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING