Claude Code 2.1.319 fixes a Bash permission bypass and a worktree sandbox escape
Claude Code 2.1.319 closes two security gaps, tightens how deny rules apply, and adds a setting that denies instead of prompting. Teams that rely on permission rules should update.
what changed
Claude Code 2.1.319 was listed on 6 November 2026. These are the changes that matter most for teams:
- Fixed a Bash permission bypass where a crafted environment prefix could hide part of a command from permission checks.
- Fixed a sandbox escape when creating a worktree.
- Fixed a case where a
sedcommand could skip the permission check in accept-edits and auto mode. - Fixed Bash deny and ask rules missing commands written with quoted words.
- A session’s exact Bash ask rule is now refused, not asked about, when a broader deny rule covers the command.
- Added the
permissions.denyInsteadOfPromptingsetting. A tool call that would wait on a permission prompt is denied, and the turn continues. - Added support for MCP tasks in the terminal. A tool call that an MCP server runs as a task moves to the background, and Claude is told the result when it finishes.
CLAUDE_CODE_DISABLE_MCP_TASKS=1turns this off. --add-dirdirectories register plugin marketplaces only after that directory’s trust dialog is accepted.
why it matters
Permission rules are only useful if they match every way a command can be written. Three of these fixes close gaps where a command could slip past a rule. Teams that depend on deny rules, auto mode or the Bash sandbox as a control should treat this as a security update.
The new setting helps unattended runs. A job that stops at a prompt that nobody will answer is a common failure. Now it can fail the call and carry on.
MCP tasks change how long tool calls behave. Results can now arrive later, after the turn has moved on.
what we would do
- Update Claude Code on developer machines and runners, and check the version with
claude --version. - Re-test your deny and ask rules against commands written with quotes and environment prefixes. Keep the cases as a small regression list.
- Set
permissions.denyInsteadOfPromptingfor headless and scheduled runs, and watch for denied calls that you did not expect. - If you run MCP servers that use tasks, test how your workflows handle a result that arrives late.
sources
- Claude Code changelog, version 2.1.319 (Anthropic)
Drafted with Claude from the linked sources, reviewed by us.