Repository navigation
1.46.0: close Claude Code background sessions from the sidebar - #66
Merged
Merged
Conversation
The Background group listed Claude Code's own background sessions but offered nothing on a row: it could be opened, not closed. A session that finished or failed months ago stayed listed for good, and the only way out was the terminal. - The row's ⋯ menu offers Close. The machine runs `claude stop <id>` (ends it if still running; an exited one refuses, which is fine) and then `claude rm <id>` (off the list, job record deleted). The conversation stays on disk. Verified on Windows, Claude Code 2.1.311. - Bulk close for the group and Ctrl/Shift-selected rows include background rows; one confirmation. - agents:backgroundClose (allow control) acts only on an id the deck is shown under the same allowlist as the listing, so a paired machine cannot name others. Older hosts answer "no such method" → the sidebar says that machine must be updated. - The row is dropped at once; the listing cache is cleared so the next poll confirms. - What's new entry bg-close; four languages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY
CI's advisory step now fails on main as well: electron ≤ 43.8.0 (eMudhra intermediate certificates, GHSA-jr5w-w6x2-84p9, high), undici ≤ 6.29.0 (EventSource DoS, high) and fast-uri ≤ 3.1.8 (moderate) were published after 1.45.2 shipped. Electron stays on 43 here; 44 is its own release. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY
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.
What
The sidebar's Background group lists Claude Code's own background sessions (
claude agents --json --all) but offered nothing on a row — it could be opened (attach), not closed. The user's three sessions from July (two "blocked", one "failed") sat there with no way out short of the terminal.How
sessionActionsForgives a background row['close'].manageCockpitSessionAction,closeCockpitSessionGroupandcloseCockpitSessionsroutebg:<machine>:<id>ids tocloseBackgroundAgents, which confirms once and calls the machine.agents:backgroundClose(allow('control')):closeBackgroundAgent(id, listed)runsclaude stop <id>(ignored when it refuses — exited sessions) thenclaude rm <id>; the id must be among the sessions the deck is shown under the same allowlist as the listing (bad-id/not-listed/failed). The listing cache is cleared afterwards.machineDeckcarry the method; an older host's "no such method" becomeshost-too-oldand a toast naming the machine.cockpit.bg_close_confirm,bg_closed,bg_close_failed,bg_close_old_host,whatsnew.f.bg-close.*. FEATURES entrybg-close1.46.0.Verified
claude --bgsession on Windows (Claude Code 2.1.311):bad-id→{ok:false,error:'bad-id'},deadbeef→not-listed, real id →{ok:true}and gone from the next listing (~/.claude/jobs/<id>removed).agents:backgroundClose; shellNavigation test updated), build OK.Also
Five stale remote branches (merged PRs #33, #35, #36, #40, #46) were deleted.
🤖 Generated with Claude Code
https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY