Skip to content

fix: reap ghost sessions and deduplicate pending entries#23

Merged
c-h- merged 1 commit intomainfrom
fix/ghost-sessions
Feb 20, 2026
Merged

fix: reap ghost sessions and deduplicate pending entries#23
c-h- merged 1 commit intomainfrom
fix/ghost-sessions

Conversation

@c-h-
Copy link
Copy Markdown
Collaborator

@c-h- c-h- commented Feb 20, 2026

Fixes ghost session cleanup and deduplicates pending-* state entries in agentctl.

🤖 Generated with Claude Code

When a session's real ID can't be resolved during launch, use
`pending-<PID>` format so unresolved entries are identifiable.

In the session tracker's poll cycle, reap stale entries:
- Remove pending-* entries when a resolved session shares the same PID
- Mark "running" sessions as stopped when their PID is dead

Add PID-based dedup in listSessions() as a safety net so pending-*
entries never appear alongside their resolved counterpart.

Fixes #22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@c-h- c-h- merged commit 98ef414 into main Feb 20, 2026
1 check passed
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