Claude Code v2.1.98 · 9 Apr 2026
Entry Kind: in v2.1.98, 09 Apr 26
New Features Section of the release
What
Enforces per-script call limits in subprocess-scrubbed environments to prevent data exfiltration via repeated write operations.
Usage
export CLAUDE_CODE_SCRIPT_CAPS='{"curl": 10, "wget": 5}'Details
JSON object mapping script/command name substrings to maximum call counts Tracks cumulative usage across the session Throws an error when a cap is exceeded: "Script call limit exceeded: X has been called N times (cap: M)" Only active when CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is enabled Designed for untrusted-input workflows where exfiltration prevention is critical Evidence
Script caps (search for "CLAUDE_CODE_SCRIPT_CAPS " and "Script call limit exceeded")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
How sure we are
One source agrees One thing we can check says the same as this entry.
Anthropic's release notes agree Added subprocess sandboxing with PID namespace isolation on Linux when CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is set, and CLAUDE_CODE_SCRIPT_CAPS…
See this entry in the whole of v2.1.98 →
Names in this entry
env CLAUDE_CODE_SCRIPT_CAPS JSON object mapping a string to a numeric cap on how many times it may appear across the shell commands a session runs. It is read once, and applied only when CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is true: before each shell command Claude Code counts each key's occurrences in the command text and fails with Script call limit exceeded once the running total passes the cap. Invalid JSON, a non-object, or no entries with a finite number disables it.
env CLAUDE_CODE_SUBPROCESS_ENV_SCRUB A hidden --inherit-permission-mode flag lets a spawned session take its permission mode from whatever launched it.
Anthropic's note
Upstream's own release notes for v2.1.98 name something this entry names, so the two are probably about the same change. Probably: the pairing is made on a shared name rather than on the words around it.
Is this right?
0
0
Feedback
What's wrong with this entry?
Hard to understand Too vague Looks wrong Not relevant to me Too long Missing the detail I wanted Duplicate of another card
Clear Learned something new I can act on this Good catch
← Previous · 6 of 23
CLAUDE_CODE_MAX_CONTEXT_TOKENS Environment Variable
In v2.1.98 New Features release-page order
Next → · 8 of 23
MCP Resource Templates Support