Skip to content

[Bug]: Claude command moved to the background shows as a run-on heading in Background work details #37786

Closed

Description

@josephv123

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. In a Claude thread, have the agent run a long Bash command in the foreground (no run_in_background), with no description.
  2. Wait for Claude Code to move it to the background on its own (normally after 10 minutes; CLAUDE_CODE_AUTO_BACKGROUND_TIMEOUT_MS=15000 on the server makes it 15 seconds).
  3. Click Details on the background work row.

Expected behavior

The entry looks like every other background command: a Command heading and the command in a code block, with its live output.

Actual behavior

The whole command is the entry's heading, with its newlines collapsed, and there is no code block or output. A command started with run_in_background in the same dialog renders correctly.

before

Cause: Claude reports a command it moved to the background only through background_tasks_changed (its task_started had is_backgrounded: false). The Claude adapter builds the roster entry from that message with the description and tool-use id, but never looks up the tool call, so the entry has no command or itemId. The dialog then shows the description, which Claude fills with the command text.

Impact

Minor bug or occasional failure

Version or commit

0.1.10-nightly.20261116.4787; still on main @ 15271c8

Environment

Ubuntu 26.04 server, web client, Claude Code 2.1.325 (Opus 5.5, reproduced with Haiku 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions