[BUG] Desktop (Code tab): "Rewind" in a session stops all background subagents that session had launched
Environment
- Claude desktop app 6.28899.6, macOS 27.2.1, Apple Silicon, Code tab
- Bundled Claude Code runtime 2.1.330
What happened
In a long session I had several background subagents running (launched with the Agent tool in the background; long tasks with builds and tests in other git worktrees). I used Rewind on a recent message of the main conversation. After the rewind:
- every running background subagent was stopped; each one produced a task-notification with
status: stopped("didn't finish before the previous session ended"); SendMessageto any of them failed with "No transcript found for agent ID", so they could not be resumed;- background shell tasks started from the session were also marked stopped.
The subagents' work in their own worktrees was not touched (commits and uncommitted changes stayed on disk), but the agents themselves were gone and had to be relaunched and re-briefed from scratch.
Expected
Rewinding the main conversation should not kill background subagents that are working on independent tasks; at least they should survive and stay resumable via SendMessage. If that isn't possible, the rewind should warn first that N background agents and M background shells will be stopped.
Steps to reproduce
- In the desktop Code tab, start a session and launch 2–3 background subagents with long-running work, plus a background shell command.
- While they are running, use Rewind on a recent message.
- All subagents and background shells are reported as stopped;
SendMessageto them fails with "No transcript found".