-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Summary
Allow configuring extended thinking (thinking budget) on a per-subagent basis when using the Task tool to spawn specialist agents.
Current Behavior
The Task tool accepts a model parameter (sonnet, opus, haiku) but has no way to configure the thinking budget for spawned agents. The ultrathink/megathink/think hard keywords only work in the main CLI session, not when passed in agent prompts.
Proposed Solution
Add an optional thinking parameter to the Task tool / subagent configuration:
# In .claude/agents/*.md
---
name: complex-architect
model: opus
thinking: ultrathink # or maxThinkingTokens: 31999
---Or via the Task tool directly:
{
"subagent_type": "pact-architect",
"model": "opus",
"thinking": "ultrathink",
"prompt": "..."
}Use Case
When orchestrating multi-agent workflows (like the PACT framework), certain specialist agents handle complex tasks that would benefit from extended thinking:
- Architect agents: Need deep reasoning for system design decisions
- Code review agents: Benefit from thorough analysis of implementation quality
- Test engineers: Could use extended thinking for edge case identification
Currently, there's no way to give these agents more "thinking time" when delegating complex work.
Alternatives Considered
- Global
MAX_THINKING_TOKENSenv var - Applies to all requests, no per-agent control - Including "ultrathink" in prompt text - Doesn't work; keywords are CLI-level, not parsed from prompts
Additional Context
This would make multi-agent orchestration significantly more powerful for complex software engineering tasks where some agents need deeper reasoning than others.