New release
Claude Code 2.1.319 closes permission gaps
Claude Code 2.1.319 fixes ways to get past permission checks, can deny instead of asking, and moves long MCP tasks to the background.
- Date
- Works with
- Claude Code
What’s new
Claude Code 2.1.319 came out on 6 November 2026. It fixes several ways that a command could get past the permission checks: a sed command could skip the check in accept-edits and auto mode, a specially written environment prefix could hide part of a Bash command from the checks, Bash deny and ask rules missed commands written with quoted words, and creating a worktree could escape the sandbox. /rewind also can no longer restore or delete a file through a folder shortcut (a symlink).
A new setting, permissions.denyInsteadOfPrompting, refuses any tool call that would wait for your answer to a permission question, and the turn goes on. It works in terminal sessions, subagents and teammates. When an MCP server (a connector) runs a tool call as a task, Claude Code now moves it to the background right away and tells Claude the result when it finishes. Set CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND to wait inside the tool call instead, or CLAUDE_CODE_DISABLE_MCP_TASKS=1 to turn MCP tasks off.
Auto mode changed for people with telemetry or feature flags turned off, for example behind a company LLM gateway: actions the server-side check cannot see are now asked about or refused, and Claude Code no longer falls back to its built-in check. CLAUDE_CODE_AUTO_MODE_SERVER=0 keeps the old behaviour. Bedrock, Vertex and Foundry are unchanged. In auto mode, claude -p now exits with code 1 when its actions were refused because no safety check was available.
Other changes: a /loop that paces itself now ends when a turn finishes without planning the next run (CLAUDE_CODE_LOOP_KEEPALIVE=1 keeps the old behaviour). Claude Code warns you when your claude.ai login ends and it goes on with a sign-in from ant auth login, which bills your Claude Console organization. New: CLAUDE_CODE_DISABLE_FEATURE_FLAGS and /claude-api latency-optimize. Fixes include slash commands typed after a space, /diff in folders with a file named HEAD, and settings files left empty when the disk fills during a save.
Why it matters
The permission fixes matter most if you use accept-edits or auto mode, because there Claude Code acts without asking you each time. If you run scheduled jobs with /loop or claude -p, check them after you update: a self-paced /loop can now stop by itself, and claude -p can return a failure code where it returned success before.
How to try it
Run claude update, then claude --version. It should show 2.1.319 or later. The "stable" channel still gives 2.1.311, which does not have these fixes. If you use /loop or claude -p in scripts, run them once and check that they still end the way you expect.
Related
Source
Checked against the source on 7 Nov 2026