Claude Code WebSearch Limits and Silent Failures
Claude Code WebSearch limits apply across subagents. Learn how to raise the cap, budget searches, and handle empty results with API fallbacks.

An empty WebSearch result doesn't mean there are no sources. In Claude Code, exceeding the session limit doesn't trigger an error, so an exhausted search budget can look like a search that found nothing. For parallel research, raising the cap is only part of the job: each agent also needs a budget and a rule for handling empty results.
Main and subagents share one search budget
During a research run with five parallel subagents, all five reported that they'd exhausted the WebSearch limit at the same time. That would be hard to explain if each agent had its own allowance. But there's only one counter: searches from the main conversation and every subagent it creates are added together.
| Item | Behavior |
|---|---|
| Default limit | 200 WebSearch calls per session |
| Scope | Shared across the main conversation and all subagents |
| Reset | /clear resets the counter |
| Reset trade-off | The research context is also cleared |
Creating more agents doesn't buy you more searches. Without an allocation, an agent that starts searching first can consume the entire shared budget. You can reset the counter with /clear, but you'll lose the context of the research in progress.
A spent budget can look like missing evidence
Once the limit is reached, WebSearch returns guidance to continue with the information already collected rather than an error. The user doesn't see that guidance; in the conversation, the search appears to have returned zero results. If an agent reads that as “there's no material on this topic,” it can leave evidence out of the report without having checked it.
In my research, an agent that switched to direct API lookups after the budget ran out actually became more accurate at verifying bibliographic details. The catch is that it hadn't recognized the exhausted limit. Its choice happened to be right, but I can't count on that happening next time, so the prompt needs to say when to switch lookup methods.

Raise the WebSearch limit and check the setting
You can raise the limit with CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION. It accepts a positive integer, not a setting that removes the limit altogether.
The agent I asked to investigate initially concluded that there was no setting for changing the cap. It had searched only the settings reference. The explanation was under environment variables in the tool reference's WebSearch section.
{
"env": {
"CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION": "500"
}
}For a temporary change, use a shell environment variable instead. You can set it for the terminal session or pass it to a single invocation.
export CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION="500" && claude
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION=500 claudeIf the variable is set in both places, the settings.json value overrides the value inherited from the shell. To raise the cap temporarily through the shell, remove that entry from the settings file or keep the setting in just one place. The Claude API's per-request web search parameter, max_uses, is a separate control.
echo $CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSIONThat command checks the shell variable, not whether Claude Code has applied the value internally. There have been reports of values in the settings.json env section not taking effect in the app. If you suspect that, try a shell export as a cross-check, and check whether the same variable is still present in the settings file.

Use APIs once you've identified the paper
Bash and WebFetch don't use the WebSearch counter. Once you know a paper's title or DOI, you can query scholarly sources such as Crossref, OpenAlex, KCI, and ScienceON through their APIs. Use WebSearch to work out what to look for, then switch to API lookups to verify the bibliographic details.
| Item | WebSearch | Direct API lookup |
|---|---|---|
| Session search limit | 200 shared calls by default; can be raised | Bash and WebFetch don't use the search counter |
| Coverage | News, institutional material, industry reports, and gray literature | Indexed scholarly literature |
| Bibliographic accuracy | Relies on snippets, with a risk of errors in years, pages, and DOIs | Structured records and original DOI records |
| Query interpretation | Understands natural-language intent | Matches queries literally, so query design matters |
| Filtering | Almost none | Filters by year, journal, citation count, and author fields |
| Reproducibility | Not reproducible | Queries can be logged and rerun |
| Citation networks | Can't trace them | Can trace them with the OpenAlex cites filter |
| Bulk collection | Each search consumes one call | Pagination can collect hundreds of records |
| Full text | Snippets only | Primarily abstracts; no full text for material that isn't open access |
flowchart LR
A[Find sources] -->|Small WebSearch budget| B[Collect metadata]
B -->|API lookup and expansion| C[Check full text]
C -->|WebFetch| D[Find gray literature]
D -->|Remaining WebSearch budget| E[Fill evidence gaps]Replacing every search with an API lookup would miss material outside scholarly indexes. If your research needs gray literature such as agency notices, standard specifications, procurement documents, and industry reports, reserve a separate WebSearch budget for it. Use WebFetch to check the text at URLs returned by the APIs, and don't count an abstract as a full-text reading.
Put search budgets and fallback rules in the prompt
For academic research, the example budget in the operating guidelines is no more than 10 WebSearch calls per agent. For research focused on gray literature, it's 30–50. Those are task budgets, not product limits, and the main conversation needs its own share of the same counter.
Each subagent may use WebSearch at most N times.
For bibliographic checks and verification of DOIs, authors, and years,
do not use WebSearch. Query the Crossref/OpenAlex/KCI/ScienceON APIs
directly with curl. Use WebFetch to check full text.
If WebSearch returns zero results, do not conclude that no material exists.
Suspect that the session search budget has been exhausted.
Retry the same topic through an API or WebFetch.
If that also returns zero results, conclude that no material was found
and report the lookup routes checked.
After two consecutive searches with zero results, treat the budget as exhausted,
switch to API-only mode, and report the switch immediately.Two consecutive empty results can be your rule for switching lookup methods. That's an operating rule for deciding whether to keep searching, not proof that the limit has been reached. An agent in API-only mode hasn't necessarily checked gray literature, so it also needs to report what it verified and which routes it used.
The order matters, too: handle material that APIs can verify first, then look for sources that need WebSearch. Reverse that order and you can spend the search budget checking academic references, only to hit the cap when you need industry reports.
On my next research run, I'll check one thing: does the agent actually switch to another lookup method when WebSearch returns no results?