LaunchKit · 2026
Back to Skills

session-state-tracker

Persistent session state management across compaction and restarts via lifecycle hooks.

0
0 downloads
by @qsmtco

Setup & Installation

openclaw skills install @qsmtco/session-state-tracker

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install session-state-tracker

What This Skill Does

Persists and restores working session state across OpenClaw compaction events and restarts using lifecycle hooks. State is stored in a local SESSION_STATE.md file with schema-validated YAML frontmatter. Three hooks run automatically: at session start, before compaction, and after compaction.

Lifecycle hooks handle state persistence and restoration automatically, so neither the user nor the agent needs to manually save or reload context during compaction.

When to use it

  • Resuming a long coding task after an agent session restart
  • Recovering task context when a session gets compacted mid-work
  • Tracking current status and next steps across multiple work sessions
  • Inspecting what the agent was working on before an unexpected restart
  • Rebuilding lost context from session transcripts after a crash

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Resume where we left off on the authentication refactor

AGENT
  1. 1session-start hook reads SESSION_STATE.md and finds a fresh state entry from the previous session
  2. 2Hook injects a summary of the saved task, status, and next steps into the initial system context
  3. 3Agent re-anchors to the prior state and identifies the next pending step
  4. 4User confirms, and work continues without re-explaining context
OUTPUT

Agent resumes the authentication refactor from the exact point recorded in the last session