Home claude-code-restricted-mode-security-audit
August 28, 2026

Claude Code restricted mode is designed to reduce what a session can do, but enabling it does not by itself make an AI development workflow safe for production. Anthropic added the --restricted flag, with CLAUDE_CODE_RESTRICTED=1 as an environment-variable alternative, in Claude Code 2.1.248 on August 27, 2026. Anthropic says the mode removes built-in tools that run commands or code and removes WebFetch unless those tools are explicitly named through --tools. File tools remain confined to the working directory, bypassPermissions is refused, and user, project and local settings files are ignored.
The shortest decision sequence is: define the task, begin with the least access it needs, record any exception, test the resulting output and require an accountable human decision. Restricted mode can support that sequence, but it cannot replace it. Anthropic does not claim that the flag certifies a workflow, eliminates every risk or guarantees correct code.
The same release introduced several adjacent controls and diagnostics. Anthropic added an experimental per-agent prompt-cache setting named experimental.cacheTtl, accepting the documented values 5m or 1h when no subagent TTL setting is configured. It also added startup, /doctor and /status diagnostics for failures involving server-managed settings. Cross-session messaging was extended to sessions on the same machine in the named environments, including when telemetry is disabled.
The changelog also records fixes for prompt-cache misses, resumed sessions and transcript cleanup. Claude Code 2.1.250 followed on August 28 with bug fixes and reliability improvements, but Anthropic’s entry does not specify their individual scope. Do not convert that short description into a claim that every reliability issue has been resolved. Restricted mode is an access-reduction feature; cache configuration, diagnostics and reliability fixes solve different operational problems.
The right question is not whether restricted mode is universally better. It is whether a task genuinely requires capabilities that the mode removes. A task-and-evidence matrix makes that decision visible before a session starts.
The decision rule is simple: start with the least capability that can complete the defined task. Add a tool only when its necessity, scope, owner and validation method are written down.
A useful pilot should test a real but reversible task. Avoid beginning with production deployment or a broad autonomous refactor. Select a bounded repository, remove live credentials from the working context and define the expected artifact before launching the session.
This is an operational pilot framework, not a certification sequence published by Anthropic. Adapt it to the repository, data, infrastructure and approval responsibilities involved.
A buyer should expect an inspectable control register rather than a verbal assurance that an agent is sandboxed. For every workflow, assign evidence, corrective action and a named owner.
Missing evidence should produce a failed audit item, not a guessed pass. The register should also show who can close a finding and what proof is required before closure.
Measure whether the workflow remains within its declared boundary and produces reviewable output. A controlled pilot can track the share of runs launched with the approved restricted configuration, the number of explicit tool exceptions, attempted out-of-scope actions, review rejection reasons, test status and time required for human verification. These are suggested internal operating measures, not performance figures supplied by Anthropic.
For business automation, connect technical acceptance to the downstream process. A change is not successful merely because Claude Code completed a task. It must pass the relevant tests, preserve required data handling, receive accountable approval and produce the intended business artifact. If the workflow supports lead operations, qualified leads should be measured from agreed CRM stages and sales dispositions rather than raw form submissions. Restricted mode does not define attribution or lead quality.
Compare restricted and expanded-capability runs only on matched task classes. Otherwise a faster result may simply reflect broader permissions rather than a better operating model. Record differences as observations, not as universal performance conclusions.
Do not assume that working-directory confinement is equivalent to a complete operating-system sandbox. Anthropic’s changelog states how file tools behave in restricted mode, but it does not document a general security certification in this release entry. Do not assume ignored settings are harmless either: a task may silently depend on instructions previously stored in user, project or local configuration. Reconstruct necessary assumptions explicitly before execution.
The remaining control is human accountability: somebody must own scope, review evidence and accept or reject the output.
A credible provider should offer more than installation. Ask for a workflow inventory, task-risk classification, tool-permission map, repository isolation design, settings-dependency review, exception procedure, test plan, reviewer matrix and retained run evidence. Require the proposal to distinguish Anthropic’s documented product behavior from the provider’s own recommended controls.
For a concrete next step, request a scoped proposal for an AI automation control pack containing a task-boundary register, tool-permission map, exception log template, acceptance-test plan and human-approval matrix. Use the AI automation service page to assess fit and confirm exactly which deliverables, systems and responsibilities would be included before engagement.
To continue the diagnosis, describe your repository, the tasks you want to delegate, the tools the agent may need, the data involved and who currently approves changes. Share that operating context with Lia and ask for a review of the required scope, evidence and approval points. Lia’s response should be treated as the start of scoping, not as proof that a particular implementation service or outcome is available.
Anthropic says it removes built-in tools that run commands or code and removes WebFetch unless a tool is explicitly named through --tools. File tools remain limited to the working directory.
Anthropic documents the --restricted flag and the CLAUDE_CODE_RESTRICTED=1 environment variable in Claude Code 2.1.248.
No. Anthropic states that restricted mode refuses bypassPermissions.
Anthropic says restricted mode ignores user, project and local settings files. Required task instructions should therefore be made explicit and reviewed.
No such guarantee is stated. Code still requires testing, security review, change approval and controlled deployment.
A useful audit should produce a version record, launch evidence, effective tool inventory, scope definition, exception log, output diff, test results and named approval owner.
Get practical insights about Google Ads, SEO, GEO, AEO, ecommerce, tracking and AI-powered digital growth.
©2024 CreatikLab. All Rights Reserved