Skip to content

Prune stale agent sessions from status surfaces#473

Merged
NagyVikt merged 1 commit into
mainfrom
agent/codex/add-agents-cleanup-sessions-command-2026-04-29-22-27
Apr 29, 2026
Merged

Prune stale agent sessions from status surfaces#473
NagyVikt merged 1 commit into
mainfrom
agent/codex/add-agents-cleanup-sessions-command-2026-04-29-22-27

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

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.
@NagyVikt NagyVikt merged commit c8a7d16 into main Apr 29, 2026
@NagyVikt NagyVikt deleted the agent/codex/add-agents-cleanup-sessions-command-2026-04-29-22-27 branch April 29, 2026 20:31
@NagyVikt NagyVikt mentioned this pull request Apr 29, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant