Desktop app: session stuck in "Running" state in sidebar after all background work has finished
Environment
- Claude Code desktop app on Windows 11 Pro (build 10.0.26200)
- Model: claude-fable-5
- Session with MCP servers connected: claude-in-chrome, computer-use, several remote MCPs
Summary
A session remains permanently marked as "Running" (gray dot + "Running" tooltip) in the
sidebar Recents list, even though every form of background work has finished. Other
sessions clear their Running indicator on their own; this inconsistency is reproducible
in sessions that used background bash tasks + async subagents + the Chrome extension MCP.
Evidence collected inside the stuck session
- Background tasks pane (Views → Tasks): shows "Finished 47" — every entry
Completed, zero active/pending entries.
- TaskList tool inside the session: "No tasks found".
- All three
run_in_backgroundbash tasks completed with exit code 0 and delivered
their completion notifications.
- One async subagent (claude-code-guide) completed ("Agent · Completed · 50s").
- The claude-in-chrome MCP tab group was explicitly closed
(tabs_close_mcp → "Closed tab … Group is now empty (auto-removed)").
- After ALL of the above, with the assistant idle between turns (no generation in
progress), the sidebar still shows the session as "Running".
- Cross-check:
list_sessions(ccd session-mgmt MCP) reportsisRunning: false
for all 20 other recent sessions — only the stuck one renders as Running.
Expected
The Running indicator should clear once no subagents, background commands, workflows,
preview servers, or pending hooks remain — matching the behavior documented in
https://code.claude.com/docs/en/desktop.md#watch-background-tasks
Actual
Indicator stays "Running" indefinitely between turns. It survives: finishing all
background tasks, closing the MCP browser tab group, and long idle periods. Archiving
the session is the only apparent way to clear it, which shouldn't be required.
Repro (approximate)
- In a desktop session, run several bash commands with
run_in_backgroundand let
them complete.
- Launch an async subagent and let it complete.
- Use the claude-in-chrome MCP (create a tab group), then close the tab group.
- Let the assistant finish its turn and leave the session idle.
- Observe the sidebar: the session remains "Running" while sessions without this
mix of background work clear on their own.
Hypothesis
Completed background task handles (or the finished-tasks list itself) appear to keep
the session's "running" flag set — the indicator seems keyed to task handles existing
rather than task handles being active. Notably the pane offers "Clear" for the 47
finished entries, suggesting they're still owned/tracked by the session process.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗