feat: add alive:end-session skill for explicit session closing#36
Open
0xmoostorm wants to merge 1 commit intoalivecontext:mainfrom
Open
feat: add alive:end-session skill for explicit session closing#360xmoostorm wants to merge 1 commit intoalivecontext:mainfrom
0xmoostorm wants to merge 1 commit intoalivecontext:mainfrom
Conversation
Sessions that end by closing the terminal or disconnecting never get their squirrel entry closed — ended: stays null forever. These ghost squirrels accumulate, pollute session history, and confuse hook fallback patterns. This adds /alive:end-session — an explicit "I'm done" command that: - Checks for unsaved stash and offers to route it - Writes a closing log entry to the active walnut - Sets ended: timestamp on the squirrel YAML - Updates transcript path Also updates save skill to reference end-session for actual session exit instead of inlining the closing protocol. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
/alive:end-session— an explicit command to cleanly close a sessionended:timestamp on squirrel YAMLProblem
Sessions that end by closing the terminal, disconnecting, or just walking away never get their squirrel entry closed. The
ended:field staysnullforever. Over time these ghost squirrels accumulate — polluting session history, confusingsystem-cleanup, and causing fallback patterns in hooks (grep -rl 'ended: null') to pick up wrong sessions.A
SessionEndhook was considered but rejected: it would break session resume, since the resume hook looks forended: nullto find active sessions. An explicit skill is the right design — the human decides when they're truly done.Changes
plugins/alive/skills/end-session/SKILL.mdplugins/alive/CLAUDE.mdplugins/alive/skills/save/SKILL.mdTest plan
/alive:end-session— verify stash routing prompt appears/alive:end-sessionwith no stash — verify it skips straight to closingended:should have ISO timestamp/alive:end-sessionon an already-closed session — should print "session already closed"🤖 Generated with Claude Code