Skip to content

fix: decouple session state — PID-based locks, pending TTL, meta cleanup#138

Merged
c-h- merged 1 commit intomainfrom
fix/arch-session-state
Mar 12, 2026
Merged

fix: decouple session state — PID-based locks, pending TTL, meta cleanup#138
c-h- merged 1 commit intomainfrom
fix/arch-session-state

Conversation

@c-h-
Copy link
Copy Markdown
Collaborator

@c-h- c-h- commented Mar 12, 2026

Closes #112, closes #114, closes #115

Foundational refactor to eliminate shadow state layers in agentctl's session management.

#115 — PID-based locks: Locks keyed by PID+directory instead of sessionId. Self-healing cleanup via 30s PID liveness interval, independent of session tracker.

#112 — Meta file cleanup: Shared session-meta.ts utility with 24h TTL. LaunchedSessionMeta minimized to sessionId, pid, startTime, launchedAt (dropped cwd, model, prompt, wrapperPid). All 5 adapters migrated.

#114 — Pending remnants: Removed updateAutoLockSessionId() (no longer needed post-PR #131).

16 files changed, -66 net lines. 527/527 tests pass.

@c-h- c-h- enabled auto-merge (squash) March 12, 2026 15:28
…nup (closes #112, closes #114, closes #115)

Locks are now keyed by PID+directory instead of session ID, making them
self-healing via periodic PID liveness checks independent of session
tracker state. Adapter LaunchedSessionMeta files are minimized to only
PID + process start time (removing cwd/model/prompt shadow state) and
auto-cleaned with a 24h TTL. The updateAutoLockSessionId method
(pending-* remnant) is removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@c-h- c-h- force-pushed the fix/arch-session-state branch from e2c9ab8 to c99051d Compare March 12, 2026 15:37
@c-h- c-h- merged commit 0c82238 into main Mar 12, 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

1 participant