Skip to content

fix: remove session from persistence on Ctrl+C exit - #74

Merged
aterrylu merged 1 commit into
mainfrom
terry/fix-persistence-exit
Mar 26, 2026
Merged

fix: remove session from persistence on Ctrl+C exit#74
aterrylu merged 1 commit into
mainfrom
terry/fix-persistence-exit

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Sessions now clean up from persistence when exited naturally (Ctrl+C, crash). Only server restart preserves them for auto-resume.

Restore removePersistedSession in pty.onExit when !shuttingDown.
When a session exits naturally (Ctrl+C, agent finished, crash), it
should be removed from persistence so it doesn't auto-resume.

When the server is shutting down (shuttingDown=true), sessions stay
in persistence so they auto-resume on next boot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aterrylu
aterrylu merged commit bedd69f into main Mar 26, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/fix-persistence-exit branch March 26, 2026 05:40
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