Claude Code runs MCP tasks in the background

Claude Code 2.1.319 (November 6, 2026) adds support for MCP tasks in the terminal.

Behavior

When an MCP server runs a tool call as a task, Claude Code moves it to the background right away. It tells Claude the result when the task finishes. The session does not block on a slow tool.

Switches

Two environment variables control it, both from the changelog:

# Wait for the MCP task inside its tool call instead of backgrounding it
export CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND=1

# Turn MCP tasks off
export CLAUDE_CODE_DISABLE_MCP_TASKS=1

The changelog names CLAUDE_CODE_DISABLE_MCP_TASKS=1 with the value 1. For CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND it says only that the variable is added, so 1 there is an assumption.

No feature flags needed

MCP tasks now work without feature-flag fetching. That covers Bedrock, Vertex, Foundry, LLM gateways and DISABLE_TELEMETRY.

The release also adds CLAUDE_CODE_DISABLE_FEATURE_FLAGS. It stops feature-flag fetching without turning off telemetry. Every flag then uses its built-in default.

Sources: Claude Code changelog.