Claude Code Moves MCP Tasks to the Background Right Away in the Terminal

Claude CodeView original changelog

Claude Code 2.1.319 adds terminal support for MCP tasks. When an MCP server runs a tool call as a task, Claude Code now moves it to the background immediately and tells Claude the result when it finishes. MCP tasks also work without feature-flag fetching, so they run on Bedrock, Vertex, Foundry, LLM gateways and with DISABLE_TELEMETRY set. Two environment variables switch the behavior off.

Key Takeaways

  • Long MCP tool calls no longer block the conversation, because Claude Code backgrounds a task call immediately.
  • Claude is told the result when the task ends, so work resumes without polling.
  • MCP tasks no longer need feature-flag fetching, so they work with DISABLE_TELEMETRY set.
  • Bedrock, Vertex, Foundry and LLM gateway users are covered, as the release notes list them explicitly.
  • CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND restores the wait-in-place behavior.
  • CLAUDE_CODE_DISABLE_MCP_TASKS=1 is the full off switch.

MCP Tasks Get Terminal Support

Claude Code 2.1.319 adds support for MCP tasks in the terminal. When an MCP server runs a tool call as a task, Claude Code now moves that call to the background right away instead of holding the conversation. When the task finishes, Claude Code tells Claude the result, so the session keeps moving while a slow tool works.

Works Without Feature-Flag Fetching

A second change in the same release removes a dependency on feature-flag fetching. MCP tasks now work in the terminal without it. That covers sessions on Amazon Bedrock, Google Vertex AI and Microsoft Foundry, sessions behind LLM gateways, and sessions running with DISABLE_TELEMETRY set, none of which could previously rely on flag fetching.

Controls

Two environment variables cover the other direction. Setting CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND makes Claude Code wait for an MCP task inside its tool call instead of moving it to the background. Setting CLAUDE_CODE_DISABLE_MCP_TASKS=1 turns MCP tasks off entirely.

A related fix in the same release addressed MCP servers on the older handshake failing to connect or returning empty results, because Claude Code had declared an extension it only uses with newer servers.