claude-code - 💡(How to fix) Fix [BUG] Background tasks from closed session persist indefinitely and cannot be stopped [2 comments, 3 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#58662Fetched 2026-05-14 03:42:38
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

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?

Background tasks from a previous session continue running after the session has ended and cannot be terminated through any available means.

What Should Happen?

Users should be able to stop the running task when pressing stop

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

Run background agent tasks in a Claude Code web session Close the session / browser tab Reopen Claude Code — tasks resume automatically Click Stop in the task panel — tasks resume again immediately Fully restart the app — tasks still resume

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Claude Code version 2.1.14

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

What I've tried:

Clicking Stop repeatedly in the task panel Closing and reopening browser tabs Fully restarting the app /stop and /tasks commands — not applicable as they are session-scoped and cannot see tasks from previous sessions Confirmed via ps aux in a live session that the tasks are not running as local processes — they are server-side Stuck tasks:

"Commit and push" (Bash task) "Push batch 3 of 4 files to GitHub main" (Agent task) Previous session ID: 19a88dd1-d34e-41e7-adc5-8d24d697ef2d

Platform: Claude Code Web (claude.ai/code) Browser: Chrome OS: Not applicable (web-based) Claude Code version: 2.1.140

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

claude-code - 💡(How to fix) Fix [BUG] Background tasks from closed session persist indefinitely and cannot be stopped [2 comments, 3 participants]