You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Background agent task-notification reports status: "completed" while the task is still running #81048
During a Claude Code session, a background agent task (Agent tool, subagent_type: fork) triggered a <task-notification> with status: "completed", including a full result summary — the normal signal that a background task has finished and is no longer running.
The task was in fact still running. The CLI's own background-task UI showed it as an active agent/shell well after the completion notification had arrived (over 50 minutes, per the shell's reported runtime). This was confirmed from within the session: calling TaskStop on an unrelated task ID returned an error listing "Running background agents," which included the task ID that had already reported status: "completed". Calling TaskStop on that ID directly succeeded, confirming the task was genuinely still alive.
An orphaned polling shell tied to the same agent (a while ! grep -q "..." ...output; do sleep 5; done loop) was also still running well past the point its exit condition should have resolved.
Impact: A status: "completed" task-notification cannot be relied on as confirmation that a background task has actually terminated. This can leave orphaned processes/shells running indefinitely with no further signal — discoverable only by manually checking the task list UI or TaskStop's error output.
Environment: Claude Code CLI on Windows, session using git worktrees with multiple concurrent background Agent (fork) tasks over a long-running session.
Closing as a duplicate of #77284 — please follow and 👍 that issue instead so we can track it in one place. If you think this was closed in error, comment here and we'll reopen.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
bcherny commentedon Aug 20, 2026
Closing as a duplicate of #77284 — please follow and 👍 that issue instead so we can track it in one place. If you think this was closed in error, comment here and we'll reopen.
🤖 Generated with Claude Code
github-actions commentedon Oct 11, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.