[BUG] Prompt-type hooks fail on Vertex AI with "output_config: Extra inputs are not permitted"

Resolved 💬 5 comments Opened Mar 23, 2026 by mrizzi Closed Apr 27, 2026

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

  1. Configure Claude Code to use Vertex AI (CLAUDE_CODE_USE_VERTEX=1)
  2. 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..."
            }
          ]
        }
      ]
    }
  }
  1. Run Claude Code with --debug
  2. Ask Claude to run any command (e.g., ls)
  3. 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_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗