[BUG] Subagent (Task/Agent) spawns fail with 400 "thinking.disabled.display: Extra inputs are not permitted"

Open 💬 0 comments Opened Jun 16, 2026 by Kinjalllll

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?

Spawning any subagent via the Task/Agent tool fails immediately with:

API Error: 400 thinking.disabled.display: Extra inputs are not permitted

The subagent does zero work (subagent_tokens: 0, tool_uses: 0) and dies after ~1.5–2s. The Workflow tool is also broken by this, since it spawns subagents through the same path.

Root cause (from inspecting the bundled request builder in v2.1.178): subagents are constructed with thinking hard-set to {type:"disabled"}, but the outgoing request still carries the session's thinking-summary field display:"summarized". The Messages API only permits display on the enabled/adaptive thinking variants, so thinking:{type:"disabled", display:"summarized"} is rejected.

The trigger is simply having thinking summaries active in the parent session (showThinkingSummaries:true with extended thinking on). When thinking display is on, that display value leaks onto every disabled-thinking subagent request.

What Should Happen?

Subagents should spawn and run normally. The request builder should omit the display field (and budget_tokens) whenever the subagent's thinking type is "disabled", since the API only allows display on enabled/adaptive thinking. Having thinking summaries on in the parent session should not corrupt subagent requests.

Error Messages/Logs

API Error: 400 thinking.disabled.display: Extra inputs are not permitted
agentId: aed82d4ea1d959652
subagent_tokens: 0
tool_uses: 0
duration_ms: 1780

Steps to Reproduce

  1. In ~/.claude/settings.json, enable thinking summaries with extended thinking active:

{
"effortLevel": "xhigh",
"showThinkingSummaries": true
}

  1. Fully quit and relaunch Claude Code.
  2. Spawn any subagent — invoke the Task/Agent tool with any trivial prompt, e.g. reply "agent alive". Try it with model haiku, sonnet, and opus.
  3. Each spawn fails immediately:

API Error: 400 thinking.disabled.display: Extra inputs are not permitted

Notes confirmed by testing:

  • Model-independent: reproduces on haiku, sonnet, and opus identically.
  • Setting showThinkingSummaries:false (with restart) does NOT fix it.
  • Setting env MAX_THINKING_TOKENS=16000 (with restart) does NOT fix it — subagents override session thinking config with an explicit {type:"disabled"}.
  • The ONLY thing that avoids the error is disabling thinking entirely (alwaysThinkingEnabled:false), which also removes summaries. So working subagents and visible thinking summaries are currently mutually exclusive.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Not sure - maybe 2.1.166

Claude Code Version

2.1.178 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Diagnosis from the bundled binary (v2.1.178):

  • Subagent thinking config builder:

thinkingConfig: w ?? (sqH() !== false ? {type:"adaptive"} : {type:"disabled"})
Subagents pass an explicit disabled w, so their thinking is always {type:"disabled"} regardless of session settings or MAX_THINKING_TOKENS.

  • The thinking display field is schema-constrained to enum(["summarized","omitted"]) and is attached to the outgoing request as display:d9, where d9 derives from the parent session's thinking-summary display being active.
  • Result: the subagent request serializes as thinking:{type:"disabled", display:"summarized"}, which the API rejects (display not allowed on the disabled variant).

Suggested fix: when the outgoing thinking.type === "disabled", drop display (and budget_tokens) from the request payload before sending.

View original on GitHub ↗