[BUG] New Explore subagent frequently tries to return more than 8192 tokens.
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?
I ask claude to do something like "Launch a swarm of Explore subagents to prime the context window for xyz" (which just replaces exactly what I'd normally accomplish with the Task subagent tool)
And about 10% of the time the subagent does all the work properly but then fails upon returning the result because it tries to return more than 8192 tokens. There's a name for the environment variable that configures this limit, but the TUI is currently flashing and epileptically scrolling far too much for me to find it.
What Should Happen?
Subagents dedicated to exploration should either restrict their output to fit in the required limit, or the limit should be dynamic somehow
Error Messages/Logs
All my terminal windows that have the right error message are bouncing and jittering and flickering too much (Claude code is still working and this is a tui bug) to copy and paste.
Steps to Reproduce
- Launch claude code in a large workbase
- Ask it to do something like "Launch a swarm of Explore subagents to prime the context window for xyz", or other uses of Explore that have a chance to return large responses
- Run it a bunch of times
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.19
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
I'm sure others will see this too, soon. The explore subagent is something I don't REALLY need on max20, but it's a neat idea that I'm sure others will use extensively!
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗