[BUG] ENABLE_TOOL_SEARCH=auto threshold scales to 100K tokens on 1M context, effectively disabling MCP deferral
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?
The ENABLE_TOOL_SEARCH=auto default uses a percentage-based threshold (10% of context window). With the 1M context window now default for Opus 4.6 on Max/Team/Enterprise (v2.1.75+), this threshold silently moved from ~20K tokens to ~100K tokens.
No realistic MCP setup hits 100K tokens in tool descriptions. The auto threshold that worked well on 200K context is now effectively dead on 1M.
Meanwhile, built-in system tools (Bash, Read, Edit, etc.) were unconditionally deferred in v2.1.69 (#31002) specifically because ~14-16K of upfront context was considered wasteful. But MCP tools of comparable size now load upfront because they fall well under the inflated 100K threshold.
Current workaround
ENABLE_TOOL_SEARCH=true or ENABLE_TOOL_SEARCH=auto:2 to force deferral.
Related issues
- #18303 — Feature request for configurable threshold (filed pre-1M)
- #31002 — Built-in tools unconditionally deferred in v2.1.69
- #19890 — Auto mode not triggering on 200K (same class of problem, smaller scale)
What Should Happen?
The threshold should either be an absolute token count (e.g. 20K, matching the old effective value) or at minimum be documented as scaling with context window size so users understand the implication.
Error Messages/Logs
Steps to Reproduce
- Use Claude Code v2.1.75+ on Max/Team/Enterprise (Opus 4.6 with 1M context)
- Connect 3-5 MCP servers (e.g. GitHub, Sentry, Jira) totaling ~30-50K tokens in tool descriptions
- Start a session with default
ENABLE_TOOL_SEARCH=auto(no env var set) - Run
/context- observe MCP tools loaded upfront, not deferred - On 200K context, the same setup would exceed 10% and trigger deferral. On 1M, it's under 5%.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.74
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗