Explore subagent fails with 400 'tools.153.custom.input_schema: JSON schema is invalid' on every dispatch

Resolved 💬 3 comments Opened May 15, 2026 by 13W Closed May 18, 2026

Summary

Every dispatch of the built-in Explore subagent (via the Agent tool with subagent_type: "Explore") is rejected by the Anthropic API:

API Error: 400 tools.153.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.

The failure is deterministic — the index (tools.153) is stable across calls and the error fires even for a trivial prompt like "say hi".

Reproduction

In Claude Code, dispatch any task to the Explore subagent:

Agent({
  description: "probe",
  subagent_type: "Explore",
  prompt: "say hi",
})

Result: 400 tools.153.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 ...

Expected

Subagent runs and returns its answer (as the other subagent types do).

What I narrowed down

I compared dispatches across all available subagent types in the same session, with the same MCP servers active (mcp__atlassian__*, mcp__claude-in-chrome__*, mcp__claude_ai_*, mcp__gitlab__*, mcp__helix__*, mcp__plugin_local-rag_memory__*, mcp__context7__*):

| subagent_type | Declared tool set | Result |
|---------------------|----------------------------------------------------------------------------|---------------|
| statusline-setup | Read, Edit | ✅ works |
| claude-code-guide | Bash, Read, WebFetch, WebSearch | ✅ works |
| Plan | All tools except Agent, ExitPlanMode, Edit, Write, NotebookEdit | ✅ works |
| general-purpose | * (all tools) | ✅ works |
| Explore | All tools except Agent, ExitPlanMode, Edit, Write, NotebookEdit | ❌ 400 |

Plan and Explore have identical exclusion sets per the system prompt description, and general-purpose is even broader (no exclusions). All three succeed; only Explore fails. This strongly suggests an additional tool that is bundled specifically into the Explore subagent's tool inventory, and that tool's input_schema does not validate against JSON Schema draft 2020-12.

Why this matters

Explore is exactly the agent the system prompt recommends for "broad codebase exploration or research that'll take more than 3 queries" — it has search-tuned read-only restrictions ideal for parallel reconnaissance. Right now it is completely unusable, forcing fall-back to general-purpose (heavier) or manual orchestration via direct grep/find/Read in the main thread (loses parallelism and bloats main context).

Environment

  • Claude Code: 2.1.142
  • OS: Linux 6.12.86+deb13-amd64 (Debian 13)
  • Node: v24.13.0
  • Model: claude-opus-4-7[1m]

Suggested next step

Audit the tool definitions packaged into the Explore subagent type (the one tool that's in Explore's bundle but not in Plan's) for a non-conformant input_schema. Common draft-2020-12 violations: nullable: true (OpenAPI), draft-07-style definitions without proper $defs, missing top-level type, or additionalProperties mismatched with properties.

View original on GitHub ↗

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