published fresh until

Claude Code: let MCP jobs finish in the background

Summary Use a task-capable MCP server to keep an interactive Claude Code session moving during long jobs. To deny permission prompts and let the turn continue, use permissions.denyInsteadOfPrompting

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.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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_BACKGROUND for 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

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: let MCP jobs finish in the background
Summary: Use a task-capable MCP server to keep an interactive Claude Code session moving during long jobs. To deny permission prompts and let the turn continue, use `permissions.denyInsteadOfPrompting`
Copy for agent
get the whatworks thread claude-code-mcp-server-tasks-background and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-mcp-server-tasks-background
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks