Background tasks panel shows long-completed agent tasks stuck under 'Running' (Claude Desktop, macOS)

Status Open
Maintainer reply None cached
Activity 3 comments · opened Jul 6, 2026

Platform: Claude Desktop app, macOS

Description:

The "Background tasks" side panel is showing ~19 entries under a "Running" section, several with elapsed timers well past 5 hours (e.g. "5h 01m 20s", "5h 01m 02s", "5h 00m 51s", "5h 00m 49s", "5h 00m 42s", "5h 00m 32s" — see attached screenshot), including entries like "Placeholder while background agents run" and "Placeholder while waiting for background agent".

These correspond to research agents I dispatched earlier in a long-running session (a multi-repo migration task) that have long since completed and returned their results in the conversation. From inside the session, running ps aux on the host shows no actual running processes corresponding to these tasks — everything has finished. Only one task in the session is genuinely still pending (waiting on an external CI build to finish).

So the panel appears to be stuck displaying stale "Running" state for tasks that actually completed a long time ago, rather than refreshing to reflect their real (completed) status. The elapsed-time counters continuing to climb (5h+) suggests the panel's timer for these entries never stopped when the underlying task finished.

Expected behavior: Completed background agent tasks should move out of the "Running" section (or show a completed/stopped state) once they actually finish, rather than continuing to display an incrementing running-time indicator indefinitely.

Steps that led here: Long session (several hours) involving many sequential/parallel Agent tool calls (research subagents) and background Bash calls across a multi-repo code migration task, interleaved with ScheduleWakeup waits for external CI. The stale "Running" entries accumulated over the course of the session as agents completed.

Screenshot attached showing the "Background tasks" panel with the affected entries.

View original on GitHub ↗

3 Comments

alon-ne · 1 month ago

<img width="1354" height="1069" alt="Image" src="https://github.com/user-attachments/assets/ae81883b-3bf0-4c64-956b-b06bf7810259" />

gilninveh-edgify · 1 month ago

Confirming the same bug on Windows (Claude Code 2.1.198, Windows desktop app, Windows 11 Pro 10.0.26200), so this is not macOS-specific.

Same symptom: a session that orchestrated 5 background agents via the Agent tool still shows a "3 running tasks" chip and three entries under Running with climbing wall-clock timers (19h+), long after the main agent consumed their results and delivered its final message.

Two details from the session transcript that may help debugging:

  1. The displayed timers are time-since-launch, not runtime. Per the <task-notification> entries in the session .jsonl, the three "Running" agents actually ran 1m 46s (106,058 ms), 5m 33s (332,815 ms), and 15m 42s (941,783 ms), and all finished roughly 19 hours before the panel was observed.
  2. The panel is inconsistent within a single session. Two other background agents in the same session, launched the same way, transitioned correctly to "Finished / Completed" with accurate durations (e.g. 28m 17s, exactly matching the 1,696,772 ms duration in the transcript notification). The three that stayed "Running" were the first three launched; the two that completed properly were the last two. So the finish-transition logic works sometimes.

UX impact echoes the OP: a "running tasks" chip with an incrementing timer on a session whose final message says the work is done reads as a hang or runaway token usage. It sent me investigating from a second session before I confirmed via the transcripts that nothing was executing. A "Finished - resumable" state (real runtime, no ticking clock) plus a bulk dismiss would resolve it.

akuney · 1 month ago

Also hitting this — multiple times today on Claude Code CLI 2.1.205, macOS 15.7.7. Same shape: top-level background Agent tasks (not nested) that completed and delivered their results via task-notification remain shown as open/running in the UI indefinitely. TaskList from inside the session reports no tasks, so it looks like a display-layer state drop rather than a lifecycle one.

— Claude