[BUG] `claude mcp serve`: Bash run_in_background output is unreachable since TaskOutput was removed (2.1.277)

Status Fixed / completed
Reported on v2.1.277
Maintainer reply None cached
Activity 1 comment · opened Oct 6, 2026 · closed Oct 12, 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?

2.1.277 removed the TaskOutput tool ("Claude reads a background task's output file with Read instead"). That works in an interactive session because the completion notification names the output file. Under claude mcp serve there is no conversation loop to receive that notification, and the Bash tool result itself does not name the file. An MCP client that calls Bash with run_in_background: true gets back only a task id and has no way to ever read the output.

The output file does exist on disk at /tmp/claude-<uid>/<cwd-slug>/<session-uuid>/tasks/<task-id>.output, but the session uuid is not exposed to the MCP client, so the path cannot be derived.

tools/list under mcp serve still advertises run_in_background on Bash and still lists TaskStop, so the flag looks usable but is a dead end.

What Should Happen?

One of:

  • the Bash result for a background task includes the output file path (the same information the interactive notification carries), or
  • run_in_background is not offered on Bash under claude mcp serve.

Error Messages/Logs

tools/call Bash {"command":"sleep 3; echo done-bg","run_in_background":true}

{"content":[{"type":"text","text":"{\"stdout\":\"\",\"stderr\":\"\",\"interrupted\":false,\"isImage\":false,\"noOutputExpected\":false,\"backgroundTaskId\":\"b025q92zk\"}"}]}

tools/list (2.1.291) returns 21 tools, no TaskOutput:

Agent, Bash, Read, Edit, Write, NotebookEdit, WebFetch, ReportFindings, WebSearch,
TaskStop, Skill, EnterWorktree, ExitWorktree, SendMessage, ListAgents, Workflow,
CronCreate, CronDelete, CronList, ScheduleWakeup, ToolSearch

Steps to Reproduce

  1. Start claude mcp serve from any MCP client over stdio (I used the Python mcp SDK; any client works).
  2. initialize, then tools/call Bash with {"command":"sleep 3; echo done-bg","run_in_background":true}.
  3. Observe the result above: a backgroundTaskId and nothing else.
  4. tools/list: there is no TaskOutput, and no other tool accepts the task id to read its output.

Claude Model

n/a (no model involved; claude mcp serve is used as a tool server)

Is this a regression?

Yes

Last Working Version

2.1.272 (last version I used that still exposed TaskOutput through mcp serve; the changelog says it was removed in 2.1.277)

Claude Code Version

2.1.291

Platform

CLI (claude mcp serve)

Operating System

Linux (Ubuntu, kernel 6.17)

Terminal/Shell

bash

Additional Information

Context: we proxy claude mcp serve running on remote lab machines over SSH into a local Claude Code, so the model and its credential stay local while tools execute remotely. Until 2.1.277 background work went through run_in_background + TaskOutput. We have worked around this by stripping run_in_background from the proxied Bash schema and using nohup ... > log & plus Read, but any direct consumer of claude mcp serve hits the same wall.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗