[DOCS] Environment-variable reference missing the WebSearch per-session cap
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/env-vars
Section/Topic
The “Variables” reference, for session-level WebSearch controls.
Current Documentation
The page describes its scope as:
“Reference for environment variables that control Claude Code behavior.”
It explains that environment variables can control feature toggles and provides a Variables table, but the table has no entry for CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION.
What's Wrong or Missing?
Claude Code 2.1.212 adds a session-wide WebSearch limit of 200 calls by default, tunable with CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION. The environment-variable reference does not list the variable, its default, the scope of the limit, or what happens when the cap is reached.
This is distinct from the API Web Search tool's request-level max_uses parameter: a Claude Code user can encounter the new session cap even when the API tool configuration has not set max_uses.
Suggested Improvement
Add a row for CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION that documents:
- the default value of
200; - that it limits WebSearch calls across the current Claude Code session;
- how to set a different numeric limit in the shell or settings
envblock; and - the user-visible behavior when the limit is exhausted.
Link the row to the Web Search tool documentation so readers can distinguish the Claude Code session cap from the API request-level max_uses setting.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/env-vars | Missing Claude Code session-cap variable |
| https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool | Existing API-level max_uses context to cross-reference |
Total scope: 2 pages should cross-reference the two different limit scopes.
The session cap was added in Claude Code 2.1.212; the release notes are listed at https://code.claude.com/docs/en/changelog.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗