[BUG] MCP auto-backgrounding at 120s: silently enabled via server flag, undocumented, orphans the result

Status Fixed / completed
Reported on v2.1.212
Maintainer reply None cached
Activity 0 comments · opened Jul 17, 2026 · closed Jul 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

What changed: MCP tool calls now auto-promote to a background task at 120s wall-clock. This appears to be gated by a server-pushed feature flag (tengu_mcp_auto_background, default 120000ms), so it switched on for existing sessions with no client update, no changelog entry, and no documentation. The first we knew of it was a long-running research tool suddenly returning a "moved to the background" notice mid-session.

Why it's a problem for our use case: we drive browser-based web-research tools via an MCP server that legitimately run 2–5 minutes, in parallel. They completed fine before. Now each one independently trips the 120s promotion, and the result comes back as a notification the agent is free to ignore — which it does. The completed answer (verified: ~22k chars, logged server-side by our tool) is orphaned; the agent never resumes it. The failure is silent and correlates with the longest, most valuable calls.

What Should Happen?

  1. Document CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS (and that 0 disables it). It is the fix, but we only found it by disassembling the client bundle.
  2. Announce feature-flag changes that alter tool-call semantics in the changelog — a server flag flipping runtime behavior on a pinned client version is surprising and hard to diagnose.
  3. Reconsider the default. For MCP tools that are legitimately long-running, backgrounding-then-notifying loses results. A resumable handle returned in-context (the way our own tool's status:"pending" + resume-token contract works) would be strictly better than a fire-and-forget notice the model ignores.

Error Messages/Logs

Steps to Reproduce

mcp_project - query (MCP)(query: "This is an example query")
MCP tool "mcp_project/query" is still running after 120s. It was moved to the background as task xxxxxxxxyy and keeps running; you'll receive a notification with the result when it completes. You can keep working in the meantime. To stop it, use TaskStop with task_id "xxxxxxxxyy". Note: it does not survive exiting this session.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.212

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗