[Bug] Anthropic API Error: Invalid JSON Schema for Tool Definition on Fresh Install

Resolved 💬 5 comments Opened Feb 10, 2026 by maximdakulinin-boop Closed Mar 19, 2026

Bug Description
Title: API Error 400 - JSON Schema Validation Failure on Fresh Install (v2.1.38)
Environment:

Claude Code Version: 2.1.38
OS: macOS (appears to be using bash shell)
Installation Method: Native installer (curl)
Account Type: Claude Max (Opus 4.6)

Description:
Fresh installation of Claude Code fails immediately after authentication with API Error 400. The error indicates a JSON schema mismatch: "tools.31.custom_input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12"
Steps to Reproduce:

Install Claude Code using: curl -fsSL https://claude.ai/install.sh | bash
Add ~/.local/bin to PATH: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Run claude config
Complete OAuth login successfully
Immediately get API error when trying to interact with Claude Code

Expected Behavior:
After successful authentication, Claude Code should be ready to use without errors.
Actual Behavior:
Both /config and /login commands return:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.31.custom_input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use."}}
Screenshots:
[Attach the two screenshots showing the installation and error]
Additional Context:

Installation completed successfully with "Installation complete!" message
Authentication via /login shows "Login successful"
Error occurs on any attempt to use Claude Code after authentication
This is a completely fresh installation with no prior Claude Code configuration

Attempted Solutions:

Added PATH configuration as suggested by installer
Completed authentication successfully
Issue persists despite successful login

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.38
  • Feedback ID: baf51427-2d55-490e-8531-4e5b542da3e9

Errors

[{"error":"Error\n    at xk (/$bunfs/root/claude:42:1144)\n    at <anonymous> (/$bunfs/root/claude:43:10097)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:45:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-10T14:15:58.088Z"},{"error":"Error\n    at xk (/$bunfs/root/claude:42:1144)\n    at <anonymous> (/$bunfs/root/claude:43:10097)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:45:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-10T14:15:58.098Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use.\"},\"request_id\":\"req_011CXzXhDQK8U3arAomPbCBc\"}\n    at generate (/$bunfs/root/claude:319:8796)\n    at makeRequest (/$bunfs/root/claude:358:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-10T14:16:06.537Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use.\"},\"request_id\":\"req_011CXzXhDP535aHbmp5gEEc2\"}\n    at generate (/$bunfs/root/claude:319:8796)\n    at makeRequest (/$bunfs/root/claude:358:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-10T14:16:06.538Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use.\"},\"request_id\":\"req_011CXzXhDXkZ6DW4BQ3kAPRz\"}\n    at generate (/$bunfs/root/claude:319:8796)\n    at makeRequest (/$bunfs/root/claude:358:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-10T14:16:06.560Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use.\"},\"request_id\":\"req_011CXzXhDVGqaYnpKtT9uUAm\"}\n    at generate (/$bunfs/root/claude:319:8796)\n    at makeRequest (/$bunfs/root/claude:358:5435)\n…

Note: Content was truncated.

View original on GitHub ↗

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