Source · release
Claude Code release 2.1.319
Summary
Claude Code 2.1.319 was released on 2026-11-06. It is a large release. Claude Code can
now run MCP tool calls that a server handles as tasks in the background. A new setting
denies tool calls instead of waiting at a permission prompt. A new /claude-api command
looks for slow spots in Claude API code. Auto mode behind LLM gateways changes, and
several permission and sandbox bypasses are fixed.
Key points
- MCP tasks in the terminal: when an MCP server runs a tool call as a task, Claude
Code moves it to the background at once and tells Claude the result when it finishes.
Nothing to install; it also works without feature-flag fetching (Bedrock, Vertex,
Foundry, gateways).
CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND=1makes it wait inside the call, andCLAUDE_CODE_DISABLE_MCP_TASKS=1turns tasks off. permissions.denyInsteadOfPrompting: set it in settings and any tool call that would wait on a permission prompt is denied, and the turn carries on. It applies to terminal sessions, subagents, and teammates. Useful for unattended runs that should never hang on a prompt./claude-api latency-optimize: finds where your Claude API code makes users wait and tries faster settings against your own eval./tasks"Earlier in this session": finished subagents stay listed, so you can reopen one and message it, even after a restart.- Auto mode behind gateways: with telemetry or feature flags off, calls the server
cannot check are asked about or denied, with no fallback to the local classifier.
CLAUDE_CODE_AUTO_MODE_SERVER=0keeps the old classifier;=1forces the server check.claude -pnow exits 1 when auto mode refused actions for lack of a safety check.CLAUDE_CODE_DISABLE_FEATURE_FLAGSstops flag fetching without turning off telemetry. - Self-paced
/loopchanged: it ends when a turn finishes without rescheduling, instead of setting a fallback wakeup.CLAUDE_CODE_LOOP_KEEPALIVE=1keeps the old behaviour. - Hooks: PostToolUse hooks now run (up to 10 s) on tool calls that finish after a new
message interrupts the turn.
${CLAUDE_PLUGIN_ROOT}now works in a plugin'ssubagentStatusLine. - Security fixes: a Bash permission bypass through a crafted environment prefix, a
sedcommand skipping checks in accept-edits and auto mode, deny rules missing commands with quoted words, a sandbox escape when creating a worktree, and/rewindwriting through a directory symlink. Self-hosted runners with--trust-workspace falsenow also block repository hooks and skills. Nested.claude/skillsfolders load only when you start or/cdthere if the Bash sandbox is on. - MCP fixes: servers on the older handshake failed to connect or returned empty results because Claude Code declared an extension it only uses with newer servers.
- Billing warning: Claude Code now warns at startup when it falls back to the
ant auth loginsign-in, which bills the Claude Console organization. - Released with TypeScript Agent SDK 0.3.319 (see that note). Python SDK 0.2.179 came out the same day; its notes list no changes.
Why it matters
Long MCP jobs no longer block the conversation, and denyInsteadOfPrompting gives
headless and scheduled runs a clean way to fail fast. The permission-bypass fixes make
upgrading worthwhile for anyone using auto or accept-edits mode.