Source: github.com/anthropics/claude-code/releases/tag/v2.1.319
When an MCP server runs a tool call as a task, Claude Code now moves it to the background right away and reports the result to Claude when it finishes. The CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND variable makes Claude Code wait for the task inside its tool call instead.
The new permissions.denyInsteadOfPrompting setting denies any tool call that would wait on a permission prompt, and the turn continues in terminal sessions, subagents and teammates. CLAUDE_CODE_DISABLE_FEATURE_FLAGS stops feature-flag fetching without turning off telemetry, so each flag uses its built-in default.
With telemetry or feature flags off, auto mode calls the server cannot check are now asked about or denied, with no fallback to the built-in classifier. Setting CLAUDE_CODE_AUTO_MODE_SERVER=0 keeps the classifier in use. The release also fixes a number of issues, including a 401 retry loop and Bash deny rules missing commands with quoted words.
Why it matters if you build agents
Agents that run Claude Code unattended can use permissions.denyInsteadOfPrompting to avoid runs stalling on a permission prompt, but denied calls will need handling in the agent's own logic.
Teams behind LLM gateways that turn off feature flags should check auto mode, since calls the server can't verify are now denied or prompted rather than handled by the local classifier.
Code that expects MCP tool results inline should account for tasks moving to the background, or set CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND to keep the call waiting.
Get stories like this every weekday
One short email with the day's agent tooling news.