Skip to main content
← Todas las noticias
6 de noviembre de 2026claude-code#claude-code#release#mcp#permissions#automation

Claude Code v2.1.319: MCP tasks go to the background

Claude Code v2.1.319 adds background MCP tasks, tightens auto-mode controls, and makes unattended failures easier to detect.

Claude Code v2.1.319 is a substantial reliability and control release. The headline change is support for MCP tasks in terminal sessions: a long-running MCP operation can move to the background immediately, while Claude is notified when the result is ready. The release also makes auto-mode behavior more explicit when telemetry or feature flags are unavailable, adds a setting that denies actions instead of waiting for permission prompts, and improves failure signals for headless automation.

MCP work can leave the foreground turn

MCP servers can expose a tool call as a task. In v2.1.319, Claude Code moves that task to the background right away and tells Claude when it completes. This gives integrations a cleaner way to handle work that takes longer than an ordinary tool call without blocking the whole terminal turn.

For an interactive session, set CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND=1 when a wrapper or integration needs Claude Code to wait for the MCP task result inside the tool call. Automatic backgrounding can still move a long-running call after two minutes; set CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS=0 when that threshold must also be disabled. The release also says MCP tasks work in terminal sessions without feature-flag fetching, including Bedrock, Vertex, Foundry, LLM gateways, and DISABLE_TELEMETRY; CLAUDE_CODE_DISABLE_MCP_TASKS=1 turns the capability off entirely.

Background execution does not make an MCP server trustworthy by itself. Review the server’s implementation, permissions, network access, and result handling, and make sure your wrapper can correlate the eventual task result with the originating session.

Auto mode is more explicit behind gateways

When telemetry or feature flags are off, including behind an LLM gateway, auto mode now asks about or denies actions that the server cannot check. It no longer falls back silently to the built-in classifier. Set CLAUDE_CODE_AUTO_MODE_SERVER=0 to keep using that classifier; Bedrock, Vertex, and Foundry are unchanged by this specific fallback rule.

Gateway operators can set CLAUDE_CODE_AUTO_MODE_SERVER=1 to enable the server-side check even when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is set. If a managed setting disables experimental betas, it must set the server switch too. Project settings and plugins can no longer turn server-side checking back on after it was disabled outside the project.

This is a meaningful policy change for unattended runs: an unavailable safeguard is now visible as a prompt or refusal instead of being quietly replaced. Test the intended mode in each provider and make automation handle a refusal as a real failure.

Permissions can fail closed without a prompt

The new permissions.denyInsteadOfPrompting setting denies a tool call that would otherwise wait for a permission prompt, allowing the turn to continue. It applies to terminal sessions, subagents, and teammates. This is useful for jobs that cannot answer an interactive question, but it also means a denied operation may leave the requested work incomplete. Pair the setting with explicit logging and a clear retry or escalation path.

The release also fixes several headless failure signals. claude -p text and JSON output now exit 1 when auto-mode actions are refused because no safety check is available. A missing MCP server during claude -p --resume preserves the deferred call and exits 1, and Agent SDK hosts receive the failed run’s own API error instead of a generic exit-code message in one disk-full case.

What to check before upgrading

Upgrade a canary first, then exercise one long-running MCP task and confirm that its completion reaches Claude. Decide whether foreground waiting or background execution fits each integration. For gateways, test both auto-mode environment switches with the same managed settings used in production. Finally, make wrappers fail on exit status 1, structured API failures, refused safeguards, and missing deferred tools rather than treating an earlier successful step as proof that the run completed.

claude update
claude --version

Claude Code v2.1.319 release notes · MCP · Settings · Claude Code documentation index