Session State Tracker for Openclaw

A robust lifecycle management tool that prevents context loss by automatically persisting and restoring AI agent state across compactions and restarts.

qsmtco
v2.0.0
Feb 19, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install session-state-tracker

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install session-state-tracker using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Session State Tracker?

The Session State Tracker is a specialized utility designed to solve the common problem of context loss in long-running AI conversations. Built specifically for the Openclaw Skills ecosystem, it acts as a persistent memory layer that records the agent's current task, status, and next steps in a local Markdown file. By using lifecycle hooks, this skill ensures that critical project information survives session compactions and gateway restarts, providing a continuous workflow for complex development tasks.

This skill is part of a growing library of Openclaw Skills focused on enhancing agent autonomy and reliability. It operates entirely locally, utilizing a schema-validated SESSION_STATE.md file within your workspace root to maintain a single source of truth. Whether you are working on a multi-day coding project or managing complex deployments, this tool keeps your agent oriented and productive without manual intervention.

Session State Tracker Use Cases

  • Maintaining project context and "train of thought" during long-running development sessions.
  • Automatically recovering the agent's status and goals after a system restart or gateway crash.
  • Ensuring the agent remains aware of blocked tasks and next steps after session memory compaction.
  • Synchronizing state between different agents working within the same workspace folder.

How Session State Tracker Works

  1. At the beginning of a new session, the session-start hook reads the SESSION_STATE.md file and injects a summary into the agent's initial context.
  2. Throughout the work process, the agent or user can update the state using the session_state_write tool to keep the record fresh.
  3. When Openclaw triggers a compaction event, the pre-compaction hook automatically saves the current progress to prevent data loss.
  4. Immediately after compaction, the post-compaction hook injects a State Anchor reminder to re-orient the agent's focus.
  5. The cycle continues across restarts, ensuring your Openclaw Skills always have access to the latest project roadmap.

Session State Tracker Setup

Install the skill via the hub:

clawhub install qsmtco/session-state-tracker

Alternatively, manually add the skill to your openclaw.json configuration:

"skills": {
  "entries": {
    "session-state-tracker": { "enabled": true }
  }
}

For advanced discovery features, ensure session indexing is enabled in your agent configuration to allow the skill to synthesize state from previous transcripts.

Session State Tracker Data Schema & Taxonomy

The skill manages a SESSION_STATE.md file in the workspace root. It uses a structured YAML frontmatter for machine readability and a Markdown body for human-readable context.

Field Type Description
project string The name of the current active project
task string A concise description of the current objective
status string The current workflow state (active, blocked, done, in-progress)
last_action string A summary of the most recent update or change
next_steps array A list of pending actions to be completed
updated string An ISO 8601 timestamp of the last modification

Session State Tracker Advanced Features

  • Automated state discovery: Synthesizes missing state information from recent session transcripts using memory search.
  • Atomic write operations: Prevents file corruption by ensuring state updates are completed successfully before replacing the old file.
  • CLI integration: Provides a session-state command-line tool for developers to inspect or manually update the agent state from the terminal.
  • Zero-touch automation: Seamlessly integrates with the lifecycle of other Openclaw Skills to handle state persistence without requiring explicit agent prompts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*