Prune stale agent sessions from status surfaces#473
Merged
NagyVikt merged 1 commit intoApr 29, 2026
Merged
Conversation
Agent session metadata can outlive its branch, worktree, or terminal lifecycle state, so cockpit and gx agents status accumulate dead rows. Add a metadata-only cleanup command that identifies clear stale criteria and removes only session JSON records. Constraint: Cleanup must never delete branches or worktrees. Rejected: Fold cleanup into gx agents status | status must stay read-only and predictable. Confidence: high Scope-risk: narrow Directive: Keep cleanup-sessions metadata-only unless a future task explicitly widens branch/worktree cleanup semantics. Tested: node --test test/agents-cleanup-sessions.test.js test/agents-status.test.js test/cli-args-dispatch.test.js Tested: openspec validate --specs Not-tested: npm test baseline remains known red outside this slice.
Merged
NagyVikt
added a commit
that referenced
this pull request
Apr 29, 2026
The npm registry is still at 7.0.41 while main contains the agent-session and cockpit work from PRs #451 through #473, so this assigns the next patch version and records release notes for that payload. Constraint: Release work must keep package metadata and README release notes in sync. Rejected: Retag or republish 7.0.41 | npm versions are immutable and the registry already reports 7.0.41. Confidence: high Scope-risk: narrow Directive: Do not publish without confirming npm still lacks 7.0.42. Tested: node --test test/metadata.test.js Tested: node --check bin/multiagent-safety.js Tested: npm pack --dry-run Tested: openspec validate --specs Tested: git diff --check Not-tested: Full npm test; current baseline is known red outside this release metadata lane. Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
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.
Automated by gx branch finish (PR flow).