CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH
Updated by Alex Sorokoletov
CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH is a Claude Code environment variable: Marks the configured endpoint as one that serves the Web Search tool, keeping the tool enabled on endpoints that otherwise would not run it. It is forwarded to the agent proxy environment. Added in v2.1.337 and still present in v2.1.337. It is not in the official reference.
| Status | Present in v2.1.337 |
|---|---|
| Added | Added in v2.1.337 |
| Category | Shell and tools |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH": "<value>"
}
}Release notes that mention it
Related variables
CLAUDE_CODE_WEB_SEARCH_FAST_ARG: When set to a truthy value, turns on the fast web-search mode; a falsy or invalid value leaves it off.CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR: Sets how many web-search budget refills accrue per hour, overriding the value the feature gate serves.CLAUDE_CODE_DISABLE_WEB_FETCH: Turns off the WebFetch tool.CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION: Sets how many WebSearch calls a session can make; the main conversation and its subagents share one budget.ENABLE_TOOL_SEARCH: Tool search/deferred loading: auto, true, false, or 0–100%.BASH_MAX_OUTPUT_LENGTH: Max bash output character length.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR: Maintain consistent working directory across commands.CLAUDE_BASH_NO_LOGIN: Replaced by CLAUDE_CODE_SHELL_PREFIX.
Frequently asked questions
What does CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH do?
Marks the configured endpoint as one that serves the Web Search tool, keeping the tool enabled on endpoints that otherwise would not run it. It is forwarded to the agent proxy environment.
Which Claude Code version has CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH?
Added in v2.1.337 and still present in v2.1.337.
How do I set CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH?
Export it before starting Claude Code (export CLAUDE_CODE_ENDPOINT_SERVES_WEB_SEARCH=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.