claude-code - 💡(How to fix) Fix Explore subagent fails with 400 'tools.153.custom.input_schema: JSON schema is invalid' on every dispatch

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…

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".

Error Message

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.

Root Cause

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).

Fix Action

Fix / Workaround

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

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

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__*):

Code Example

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.

---

Agent({
  description: "probe",
  subagent_type: "Explore",
  prompt: "say hi",
})
RAW_BUFFERClick to expand / collapse

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_typeDeclared tool setResult
statusline-setupRead, Edit✅ works
claude-code-guideBash, Read, WebFetch, WebSearch✅ works
PlanAll tools except Agent, ExitPlanMode, Edit, Write, NotebookEdit✅ works
general-purpose* (all tools)✅ works
ExploreAll 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.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Explore subagent fails with 400 'tools.153.custom.input_schema: JSON schema is invalid' on every dispatch