claude-code - 💡(How to fix) Fix [BUG] Background tasks (Agent/Bash) remain "Running" in Tasks panel after completion [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48989Fetched 2026-04-17 08:53:53
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

When background agents or Bash commands complete, the Tasks panel continues to show them as "실행 중" (Running) with a green dot. They never transition to a completed/stopped state in the UI, even though the actual processes have finished and returned results.

Error Message

Error Messages/Logs

Root Cause

When background agents or Bash commands complete, the Tasks panel continues to show them as "실행 중" (Running) with a green dot. They never transition to a completed/stopped state in the UI, even though the actual processes have finished and returned results.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Description

When background agents or Bash commands complete, the Tasks panel continues to show them as "실행 중" (Running) with a green dot. They never transition to a completed/stopped state in the UI, even though the actual processes have finished and returned results.

Steps to Reproduce

  1. Spawn 2+ background agents (run_in_background: true) that each execute multiple Bash commands
  2. Wait for all agents to complete (completion notifications are received correctly)
  3. Open the Tasks panel (작업)

Expected Behavior

Completed tasks should show as "완료됨" (Completed) or be automatically removed from the "실행 중" section.

Actual Behavior

10+ completed Bash tasks remain stuck in "실행 중" (Running) state indefinitely. Only manual dismissal (clicking X) clears them. The "완료됨" section correctly shows the parent Agent tasks, but all child Bash commands spawned by those agents stay in "실행 중".

Environment

  • Claude Code Desktop App (Windows 11 Pro)
  • Model: claude-opus-4-6[1m]
  • Date: 2026-04-16
  • Scenario: 2 background Opus agents, each running 15-30+ Bash/Read/Write tool calls

Screenshot

(Attach the screenshot showing 10+ tasks stuck as 실행 중)

<img width="1056" height="1113" alt="Image" src="https://github.com/user-attachments/assets/82d0a11b-e87b-4582-95fd-bbb1159fd2e9" />

What Should Happen?

완료 처리 되어야 함.

Error Messages/Logs

Steps to Reproduce

작업 진행 후 우측 패널에 작업 창을 열어두면 모두 실행중 상태로 계속 유지됨.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

버전 1.2581.0 (f10398)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The Tasks panel in the Claude Code Desktop App may not be updating correctly due to an issue with background agents or Bash commands not being properly marked as completed.

Guidance

  • Verify that the completion notifications for the background agents are being received and processed correctly, as this could be a key factor in the tasks not being marked as completed.
  • Check the code that handles the state transition of tasks in the Tasks panel to ensure it is correctly updating the state when a task is completed.
  • Investigate if there are any issues with the communication between the background agents and the Tasks panel that could be preventing the tasks from being marked as completed.
  • Consider adding logging or debugging statements to the code to help identify where the issue is occurring and why the tasks are not being marked as completed.

Example

No specific code example can be provided without more information about the codebase, but adding logging statements to the completion notification handling code could look something like this:

def handle_completion_notification(notification):
    # Log the receipt of the completion notification
    print("Received completion notification for task {}".format(notification.task_id))
    # Update the task state in the Tasks panel
    update_task_state(notification.task_id, "completed")

Notes

The issue may be specific to the Opus model or the Windows 11 Pro environment, and further investigation would be needed to determine the root cause. Additionally, the fact that the "완료됨" section correctly shows the parent Agent tasks, but not the child Bash commands, suggests that the issue may be related to how the tasks are being created or updated.

Recommendation

Apply a workaround, such as manually dismissing the tasks or adding a timer to automatically dismiss tasks after a certain period of time, until the root cause of the issue can be determined and fixed. This will at least allow the Tasks panel to be cleared of completed tasks, even if the underlying issue is not resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING