Claude Code 2.1.314 Closes a Managed-Policy Fail-Open and Adds a Switch That Blocks Writes Outside Working Directories
- What happened
- Claude Code 2.1.314 (30 October 2026) fixes a managed-policy fail-open, a sandbox gap on resumed headless worktrees and a --setting-sources leak, and adds a setting that blocks file-tool writes outside working directories.
- Why it matters
- Admins who rely on forceRemoteSettingsRefresh to stop unmanaged sessions were not covered once the cached settings expired and the server was unreachable.
- What to do
- Upgrade every managed machine to 2.1.314, and consider turning on permissions.blockWritesOutsideWorkingDirectories for unattended runs.
Update now if your Claude Code guardrails live in managed settings. Claude Code 2.1.314, dated 30 October 2026 in Anthropic's changelog, fixes a case where a session could start with no policy at all. It also closes three narrower gaps in the sandbox, hooks and settings sources, and adds the first setting that makes Claude's file tools refuse writes outside the working directories in every permission mode. Our Claude Code rating stays conditional: this is a routine hardening release, and the right response is to upgrade, not to rethink the tool.
What happened
The managed-policy fail-open
The changelog, verbatim: "Fixed forceRemoteSettingsRefresh set only in remote managed settings no longer applying once the stored copy had expired, which let sessions start without policy when the server could not be reached".
In practice: an organization that set forceRemoteSettingsRefresh only in its remote managed settings expected Claude Code to refuse to run unmanaged. Once the cached copy expired, that flag stopped applying, so a machine that could not reach the settings server started a session with no policy. Machines that never lost contact with the server were not exposed by this path.
Three more permission and sandbox fixes
All verbatim from the 2.1.314 entry:
- "Fixed sandbox protections not applying to a worktree entered by
claude -p --resumeor--continue" - "Fixed a settings file excluded with
--setting-sourcesstill supplying some settings, such as auto mode rules and saved permission consents" - "Fixed hooks matching Bash not running on shell commands started by the Monitor tool; such hooks can block or ask, but not approve or rewrite those commands"
New hardening switches
- "Added
permissions.blockWritesOutsideWorkingDirectories: Write, Edit and NotebookEdit refuse paths outside the working directories in every permission mode" - "Changed Claude's file tools to ask before editing the local copy of your organization's server-managed settings, as they do for your settings files"
- "Changed flagged requests to retry on another model, not end in a refusal, when
ANTHROPIC_DEFAULT_OPUS_MODEL,availableModelsordeniedModelsleaves only an older Opus model, or none"
The same entry adds idle compaction to VS Code and Claude Desktop's Code tab: "a 200K+ token conversation left idle is summarized, and the summary is used on your next message if the prompt cache has expired".
Why it matters
The fail-open is the headline. forceRemoteSettingsRefresh exists so that a managed machine does not run without policy, and it failed in exactly the case it was meant for: an expired cache plus an unreachable server. Any deny rules, sandbox settings or model restrictions delivered through remote managed settings were absent from those sessions.
The other three fixes each remove a quiet bypass:
- Resumed headless jobs. Anyone who resumes
claude -pjobs in sandboxed worktrees ran them without sandbox protections. - Excluded settings files. A file excluded with
--setting-sourcescould still carry auto mode rules and saved permission consents into a session. - Monitor tool commands. Shell commands started by the Monitor tool skipped Bash hooks, so a blocking hook did not fire on them.
The new permissions.blockWritesOutsideWorkingDirectories setting covers Claude's file tools only (Write, Edit and NotebookEdit). The changelog does not say it applies to Bash, so a shell command can still write elsewhere unless the sandbox or a deny rule stops it.
What changes for you
- Managed fleets: upgrade every machine to 2.1.314, starting with any that rely on
forceRemoteSettingsRefreshto block sessions without policy. - Headless pipelines: if you run
claude -p --resumeor--continueinside sandboxed worktrees, upgrade before the next run. - Unattended runs: consider setting
permissions.blockWritesOutsideWorkingDirectoriesin managed or project settings, and pair it with the sandbox or Bash deny rules, since it does not cover shell commands. - Teams using
--setting-sources: after upgrading, recheck which auto mode rules and saved permission consents still apply.
What this does not tell you
The changelog names no CVE and links no advisory, so there is no official severity rating. There is no 2.1.313 entry: the changelog goes from 2.1.312 (27 October) straight to 2.1.314, and gives no reason. We have not tested 2.1.314 ourselves.
What to do
- 1 Upgrade Claude Code to 2.1.314 on every managed machine, especially where forceRemoteSettingsRefresh is meant to block sessions without policy.
- 2 If you run headless jobs with claude -p --resume or --continue inside sandboxed worktrees, upgrade before the next run.
- 3 Consider setting permissions.blockWritesOutsideWorkingDirectories in managed or project settings so Write, Edit and NotebookEdit refuse paths outside the working directories in every permission mode.
- 4 If you exclude a settings file with --setting-sources, recheck which auto mode rules and saved permission consents apply after upgrading.
Affected tools & models
Never need to catch up again
The weekly delta: only verdict changes and act-now items. No digest filler.