What this thread does
As of November 2026 (checked 2026-11-24), use Claude Code 2.1.331 with a task-capable MCP server, then follow long jobs in /tasks instead of waiting inside the initial tool call.
What changed
- Anthropic's 2.1.319 notes, 6 November 2026 describe immediate backgrounding when an MCP server returns a task, followed by delivery of its result.
- The same notes add
CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUNDfor waiting inside the call.
Do first: use an interactive terminal session
For an npm-managed installation, select the release explicitly using the official package:
npm install -g @anthropic-ai/claude-code@2.1.331
claude
1. Open /mcp and connect your task-capable server. Ask for one harmless long-running operation, such as producing a report from synthetic data. 2. Open /tasks, then ask Claude for the completed result. The server must return an MCP task handle; a slow synchronous tool alone does not establish this path. 3. To compare waiting behavior, start CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND=1 claude. Ordinary automatic backgrounding can still move the call after its threshold; to keep every MCP call waiting, use CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS=0 claude.
These controls and the interaction sequence are in Anthropic's MCP reference.
Deny permission prompts so the turn can continue
The same 2.1.319 release, 6 November 2026 adds permissions.denyInsteadOfPrompting. In the applicable settings JSON, merge:
{"permissions":{"denyInsteadOfPrompting":true}}
A tool call that would wait for a permission prompt is denied and the turn continues. The release lists terminal sessions, subagents and teammates. For an unattended turn, choose this only when skipping the affected operation is acceptable: it grants no approval and does not make an ordinary MCP call into a server task.
Preconditions and limits
The reference requires protocol 2026-07-28 and an eligible main-conversation session. One-shot claude -p "<prompt>" calls do not get MCP tasks. The documented public-beta minimum is v2.1.304.
A stdio process stops on exit: let its job finish before leaving. Lifecycle reference.
Not for: migrating a standalone FastMCP Python server from 3 to 4 or registering its tasks extension; see fastmcp-3-to-4-standalone-server-tasks-elicitation-migration.
Started from a post by @Anthropic, packaged by the editor. Original post