Pressing Space in the background agents view terminates a running background Workflow
What happened
Pressing Space in the background agents view (claude agents) terminates a running background Workflow. This is reproducible.
According to the docs (agent-view), Space should only Peek at the selected session's latest output — it should have no effect on the run itself. In practice, pressing Space while a multi-agent Workflow is running in the background causes that Workflow to be stopped.
Steps to reproduce
- Launch a long-running multi-agent Workflow so it runs in the background.
- Open the background agents view (
claude agents). - Select the session and press Space.
- The running Workflow is terminated.
Reproduced twice, same result each time.
Observed error / notifications
When the Workflow is stopped this way, notifications report:
...was checkpointed for the background fork but could not be resumed (adopt scriptPath rejected).
No completion record was found for background workflow ... It may have been stopped ... or it may have been running when the previous Claude Code process exited.
Follow-on problem: cross-session resume loses cache
After the interruption, resuming with Workflow({ scriptPath, resumeFromRunId }) does not hit the cache — it restarts the pipeline from the first stage instead of replaying completed agent() calls. The completed run's journal.jsonl lives under the original session's transcript dir, and the resume runs under a new session, so the same-session-only resume cache misses entirely. This wastes a large amount of tokens and risks overwriting near-final artifacts.
(This resume-cache behavior looks related to #65796 and #67488.)
Expected behavior
- Space in the background agents view should only Peek; it must never stop a running Workflow.
- If a session transition is unavoidable, an in-flight Workflow should be adoptable/resumable without losing its cache — resume should replay completed agents rather than restarting from stage 1.
Impact
A single accidental keypress can destroy a long-running, expensive background Workflow with no lossless recovery path. Space is a very low-friction key, so the blast radius is high.
Environment
- Claude Code: 2.1.206
- OS: Linux 6.8.0-117-generic
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗