claude/for
Search
Subscribe
Claude CodeUpdated

CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION and the new refill rate

The 200-call WebSearch cap (CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION) refills at 100/hour on 2.1.290+. CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR sets it.

On Claude Code 2.1.290 or later, the interactive session's WebSearch budget refills over time instead of ending after 200 calls. The CHANGELOG gives the rate as 100 calls/hour. To change it, set CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR. Per the CHANGELOG, 0 turns the refill off. As of 2026-10-22, the official env-vars page documents the variable: default 100 in an interactive session, 0 (refill off) in -p sessions, plain digits only.

TL;DR: Variable CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR · default 100 calls/hour interactive, 0 in -p · 0 = refill off · plain digits only · floor 2.1.290 (take 2.1.291 for its regression fixes) · the 200-call cap still exists and refills · /clear resets the count. Checked 2026-10-22.

What 2.1.290 changed

The Claude Code CHANGELOG entry for 2.1.290 reads:

Changed the interactive session's WebSearch budget to refill over time (100 calls/hour; CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR sets the rate, 0 turns it off) instead of ending after 200 calls

That bullet supports five facts, and no more:

  • It's about the interactive session's WebSearch budget.
  • The budget now refills over time.
  • The stated rate is 100 calls/hour.
  • CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR sets the rate, and 0 turns it off.
  • It replaces the old behavior of ending after 200 calls.

For context, the old cap came from 2.1.212: "Added a session-wide limit on WebSearch tool calls (default 200, tunable via CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION) to stop runaway search loops." The 2.1.290 bullet doesn't mention that variable. The CHANGELOG doesn't date its entries, so we can't give a release day. Go by version number.

How to set CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR

Shell, before launching:

export CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR=50   # calls per hour, plain digits only
claude

Settings file, using the generic env key. The env-vars page documents this for any variable:

{
  "env": {
    "CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR": "50"
  }
}

Use ~/.claude/settings.json for yourself, or managed settings to set it org-wide. Whether project .claude/settings.json may set this variable isn't documented. The same release (2.1.290) stopped project settings from setting CLAUDE_CODE_DISABLE_ATTACHMENTS, so don't assume. Shell, user, or managed is the safe choice.

What the value means. The env-vars row defines it as the refill rate "in calls per hour". The default is 100 in an interactive terminal session and 0, which turns refill off, in a non-interactive session. It "takes plain digits only; any other spelling reads as unset", so write a bare number such as 50. No maximum is published.

Relaunch. The docs say settings env changes apply to a running session unless the feature reads its variables once at startup. They don't say which kind this is, so relaunch claude. Shell exports always need a relaunch.

Check claude --version. The variable first appears in the 2.1.290 entry. If you're on 2.1.290, 2.1.291 fixes a regression where cloud sessions could drop answers to permission prompts.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

What the docs say now

As of 2026-10-22:

SourceWhat it says
CHANGELOG 2.1.290Budget refills (100 calls/hour). CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR sets the rate, and 0 turns it off. Replaces ending after 200
env-varsCLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR: refill rate in calls per hour, default 100 interactive and 0 (off) non-interactive, plain digits only, v2.1.290+. CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION: cap (default: 200) that "can be raised but not turned off"
tools referenceAn interactive session has a 200-call limit, shared by the main conversation and its subagents. On 2.1.290+ it "refills at about 100 calls per hour". /clear resets the count. In -p and the Agent SDK, the limit applies per turn

What that settles:

  • Both variables apply. The tools reference lists raising the cap and waiting for the refill as separate ways to get more searches.
  • Subagents share the limit. A parallel research fan-out counts against the same budget.
  • /clear resets the count, unless work that can still spawn subagents, such as a running workflow, survives the clear.
  • -p and the Agent SDK count per turn. The limit resets on your next message or a new claude -p run, and refill is off there by default.

The docs don't say what an interactive session does with refill set to 0 beyond turning refill off. Our read is that the 200-call cap then works as it did before 2.1.290, but that's an inference.

Not WebFetch, not structured outputs

Pitfalls

  • Writing the value with units or spaces. The env-vars row takes plain digits only; anything else reads as unset.
  • Setting it on a build older than 2.1.290. Nothing in the CHANGELOG says older builds read it.
  • Reading 0 as "unlimited" or "WebSearch off." Per the CHANGELOG, it turns the refill off.
  • Mixing it up with plan usage limits. The WebSearch budget counts tool calls. Your plan's usage limits are a separate thing (rate limits).
  • Inventing a slash command. We found none that changes the rate. /clear only resets the count.

FAQ

What's the exact variable name?

CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR, from CHANGELOG 2.1.290.

What's the default rate?

100 calls per hour in an interactive terminal session, per the CHANGELOG and the env-vars page. In a non-interactive (-p) session the default is 0, so refill is off.

How do I turn the refill off?

Set it to 0. That turns off the refill only, not WebSearch. To get more searches after that, raise CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION or run /clear.

Does the 200-call limit still exist?

Yes. The tools reference still gives an interactive session a 200-call limit, now refilled at about 100 calls per hour on 2.1.290 or later. CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION still raises that cap.

Sources (checked 2026-10-22)

Related: Turn off WebFetch · Turn off structured outputs · Managed settings · Rate limits · Search-heavy daily research brief

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.