Skip to content

Claude Code stops blocking on long-running MCP tool calls

Version 2.1.319 moves MCP task-based tool calls to the background by default, so Claude keeps working and is told the result once it lands.

Claude Code 2.1.319 changes how it handles MCP servers that run a tool call as a task. Previously, Claude Code waited for the task to finish before continuing. Now it moves the task to the background as soon as the server starts it, carries on with the conversation, and only tells Claude the result once the task completes.

If you rely on the old wait-and-block order, set CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND to get it back. MCP tasks also now work without feature-flag fetching, so they function on Bedrock, Vertex, Foundry, and other LLM gateways, or with DISABLE_TELEMETRY set. CLAUDE_CODE_DISABLE_MCP_TASKS=1 turns the whole task mechanism off.

# restore the previous blocking behaviour
CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND=1

# disable MCP tasks entirely
CLAUDE_CODE_DISABLE_MCP_TASKS=1

Why it matters: if you build an MCP server that exposes a slow operation as a task, Claude Code no longer stalls the whole session on it by default. That is a behaviour change, not just an addition, so anything you built around the old blocking order needs the new environment variable, not a rewrite.

Share

Related reading

More from The Wire

All briefs