[BUG] Background tasks from closed session persist indefinitely and cannot be stopped

Open 💬 5 comments Opened May 13, 2026 by JordanGeogheganMGTS

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗