Repository navigation
1.47.1: close a background session when Claude Code's background service is off - #68
Closed
writingdeveloper wants to merge 1 commit into
Closed
writingdeveloper wants to merge 1 commit into
writingdeveloper wants to merge 1 commit into
Conversation
…ice is off `claude stop` and `claude rm` talk to Claude Code's on-demand background service, which exits 50 s after its last client and is absent after a Claude Code update. Without it, Claude Code 2.1.312 answers "couldn't remove <id> — the background service may be restarting. Try again in a moment." and does not start one, so closing a background session from the sidebar failed — on this PC and on a paired one — and the log said only "failed". - closeBackgroundAgent: when rm refuses, start the service the way Claude Code does (`claude daemon run --origin transient`, which exits itself once idle), wait for `claude daemon status`, and run stop + rm once more. A session that is already gone counts as closed. What rm said on stderr goes to the log. - The failure toast names the PC the command has to run on; before, it sent the user to run `claude rm` on this PC for a session on another one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdbKDr2tTfCLAZv7WbV8kX
writingdeveloper
added a commit
that referenced
this pull request
Oct 27, 2026
…ice is off (#68) `claude stop` and `claude rm` talk to Claude Code's on-demand background service, which exits 50 s after its last client and is absent after a Claude Code update. Without it, Claude Code 2.1.312 answers "couldn't remove <id> — the background service may be restarting. Try again in a moment." and does not start one, so closing a background session from the sidebar failed — on this PC and on a paired one — and the log said only "failed". - closeBackgroundAgent: when rm refuses, start the service the way Claude Code does (`claude daemon run --origin transient`, which exits itself once idle), wait for `claude daemon status`, and run stop + rm once more. A session that is already gone counts as closed. What rm said on stderr goes to the log. - The failure toast names the PC the command has to run on; before, it sent the user to run `claude rm` on this PC for a session on another one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdbKDr2tTfCLAZv7WbV8kX
Owner
Author
|
Merged into main as 08e485f (local squash; released as v1.47.1). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closing a Claude Code background session from the sidebar (1.46.0) failed with "Could not close the background session '…' — try claude rm in a terminal", on this PC and on a paired one. Running
claude rm <id>by hand on this PC for a session on the other PC answeredNo job matching.Cause
claude stop/claude rmtalk to Claude Code's background service — an on-demand daemon that exits 50 s after its last client, and is absent after a Claude Code update. With none running, Claude Code 2.1.312 answerscouldn't remove <id> — the background service may be restarting. Try again in a moment.and does not start one. Openingclaude agentsonce fixes it, because that starts the service. DevDeck did not read stderr, so the log said onlyfailed.Fix
closeBackgroundAgent: whenrmrefuses, start the service the way Claude Code itself does (claude daemon run --origin transient— exits on its own once idle), wait forclaude daemon status, thenstop+rmonce more. "No job matching" counts as closed.rm's stderr goes to the diagnostics log.claude agentsworkaround (ko/en/ja/zh).stopped/removedonce it is up; transient service exits after 50 s idle; a throwaway session closed through the built module).Release notes:
docs/releases/1.47.1.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01LdbKDr2tTfCLAZv7WbV8kX