[DOCS] Background session docs are outdated for long-running command survival across process restarts and Windows handoff

Open 💬 0 comments Opened Jun 29, 2026 by coygeek

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/interactive-mode

Section/Topic

The "How backgrounding works" section for background tasks, and the agent-view supervisor process section.

Current Documentation

The interactive-mode page currently says:

"Background tasks are automatically cleaned up when Claude Code exits"

The agent-view page separately documents supervisor process recovery:

"The supervisor watches the installed Claude Code binary on disk and restarts into the new version after the regular auto-updater replaces it. This is a local file watch, not a network check. Background sessions are detached processes, so they keep running through the restart and the new supervisor reconnects to them."
"If attaching, peeking, or claude logs reports that the background service did not respond, the supervisor process has likely stalled. Stop it and let the next claude agents start a fresh one. To keep your background sessions running through the restart, pass --keep-workers."

The docs do not explain the v2.1.196 behavior for long-running commands and workflows surviving the session process being stopped, restarted, or updated, especially on Windows.

What's Wrong or Missing?

Claude Code v2.1.196 improved background session reliability so long-running commands and workflows survive the session's process being stopped, restarted, or updated. On Windows, background shells are handed off instead of being killed. That appears to conflict with the broad current statement that background tasks are automatically cleaned up when Claude Code exits, and the agent-view page does not describe the Windows shell handoff behavior.

Suggested Improvement

Update the backgrounding docs to distinguish ordinary interactive-session exit from managed background session restart/recovery:

In managed background sessions, long-running commands and workflows survive process restarts and updates. The supervisor reconnects to the session state after restart; on Windows, background shells are handed off instead of being killed. This differs from short-lived background tasks in a normal foreground session, which may be cleaned up when that foreground Claude Code process exits.

Also add a short note in the agent-view supervisor section explaining what users should expect after daemon restart or update when long-running shell commands are active.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/interactive-mode | Background task behavior says tasks are cleaned up on exit |
| https://code.claude.com/docs/en/agent-view | Supervisor restart and background session recovery behavior |

Total scope: 2 pages affected.

Claude Code v2.1.196 improved background session reliability for long-running commands and workflows across stopped, restarted, or updated session processes, including Windows shell handoff.

View original on GitHub ↗