Skip to content

WebSearch returns 0 results: Claude Code

Quick fix

Temporarily disable built-in WebSearch. Use Brave Search MCP to find pages, then use WebFetch to read them.

Error output
Web search results for query: "<query>"


REMINDER: You MUST include the sources above in your response to the user using markdown hyperlinks.

In the reported Claude Code 2.1.209, CC Switch 3.17.0, and Codex OAuth proxy environment, built-in `WebSearch` returned no results. JSONL showed `"results": []` and `"searchCount": 0`; one call took 264.42 seconds, and the top-level request then produced no output until it was manually interrupted. Brave Search MCP returned results immediately in the same session, indicating general network access was available.

The original post could not determine whether the issue was in Claude Code's WebSearch wrapper or CC Switch's Claude-to-Codex request conversion. It also did not confirm whether built-in WebSearch is officially supported by the Codex OAuth provider. Closed status does not indicate a fix. The reporter's verified workaround was to bypass built-in WebSearch and use Brave Search MCP with WebFetch.

  1. Add `WebSearch` to the existing deny list in `~/.claude/settings.json`, keeping the existing entries.

    ~/.claude/settings.json
    {
    "permissions": {
    "deny": [
    "WebSearch"
    ]
    }
    }
  2. In `~/.claude/CLAUDE.md`, instruct Claude Code not to use built-in `WebSearch`. For web research, first use Brave Search MCP to locate a URL, then use `WebFetch` to read the specific page.

    ~/.claude/CLAUDE.md
    Disable and do not use the built-in `WebSearch` tool
    For general web research, first use Brave Search MCP to locate relevant pages, then use `WebFetch` to read specific URLs
  3. Start a new Claude Code session so the global settings and `CLAUDE.md` reload more completely.

ToolClaude Code
Version2.1.209(报告的受影响版本)
PlatformsmacOS
Is Claude Code's built-in WebSearch officially supported through the Codex OAuth provider?
The original post raised this question but did not provide a confirmed answer.
Will the converter preserve and execute required server-side `web_search` calls, or only return the model's tool-call intent and produce empty results?
The original post could not confirm this and provided no verified conclusion.
Can diagnostic logs be added for converted built-in WebSearch requests and upstream responses or errors, with bounded timeouts?
This was an improvement request to the maintainers in the original post; no implementation status was recorded.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.