Session Management for Claude Code for Openclaw

Session Management gives Claude Code a durable, structured memory system for resuming work, checkpointing progress, closing sessions, and reviewing daily project health.

conorbronsdon
v1.0.1
Aug 4, 2026
0
330
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-management

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-management 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 Management for Claude Code?

Session Management for Claude Code is a user-invoked lifecycle workflow that prevents every coding conversation from starting cold. It uses Markdown state files, daily session logs, decision records, blocker tracking, and heartbeat reports to preserve project context across terminal sessions.

As an Openclaw Skills workflow, it helps developers maintain fresh priorities, record rejected alternatives and rationale, identify stale work, surface deadlines, and safely propose durable memory updates. The system is designed to be fast, transparent, and resilient when a session ends unexpectedly.

Session Management for Claude Code Use Cases

  • Resume a Claude Code project with a concise briefing of priorities, blockers, recent changes, and open threads.
  • Save a lightweight mid-session checkpoint without ending the conversation.
  • Capture topics, decisions, rejected alternatives, state changes, and next actions before closing a session.
  • Run a morning heartbeat to detect stale state files, overdue work, upcoming deadlines, and memory gaps.
  • Coordinate parallel coding sessions by checking recent Git commits and flagging potential file conflicts.
  • Preserve recurring environment quirks, workflow preferences, and debugging lessons in approved Claude Code memory.
  • Maintain an auditable decision history so future sessions do not revisit previously rejected approaches.
  • Add reliable session continuity to projects using Openclaw Skills and Git-based workflows.

How Session Management for Claude Code Works

  1. Start with /start. The workflow gets the date, checks Git history since the previous session, and identifies files changed by recent work.
  2. Load project context. It reads state/current.md, recent entries in state/decisions.md, weekly priorities, blockers, and today’s session log when available.
  3. Run health checks. It flags stale current state, weekly priorities, or blockers, along with inbox files and overdue task items when those resources exist.
  4. Provide a focused briefing. Claude Code summarizes freshness, changed files, the top priorities, time-sensitive threads, and blockers, then asks what to focus on.
  5. Checkpoint with /update. The workflow scans the recent conversation, appends a short update to the daily session log, and changes current.md only when project state actually changed.
  6. Close with /end. It extracts topics, decisions, rejected alternatives, state changes, open threads, and next actions, then presents the summary for confirmation.
  7. Persist session state. The system updates the session log, current state, blocker list, weekly priorities, decision log, and append-only update history as needed.
  8. Propose durable memory. It identifies recurring lessons or friction points and presents zero to two memory proposals; nothing is written to auto-memory without explicit approval.
  9. Check collaboration and Git safety. It detects possible parallel-session edits, uncommitted changes, and unpushed commits before the session is considered complete.
  10. Run /today when starting the day. The heartbeat reviews recent commits and session logs, checks freshness and deadlines, ages open threads, proposes memory-gap corrections, records the check-in, and asks for the day’s focus.

Session Management for Claude Code Setup

1. Create the project directories and state files

Create the following structure in the project root or another location used by your workflow:

mkdir -p state sessions
touch state/current.md state/decisions.md state/weekly-priorities.md state/blockers.md

The workflow can create state/current-log.md, state/heartbeat-log.md, and daily session logs automatically when they are first needed.

2. Initialize state/current.md

# Current State

Last updated: [date]

## Active Priorities
1. [Your top priority]
2. [Second priority]

## Active Context
- [Open thread or current work] *(created M/D)*

## Recently Completed
- [Completed item] *(M/D)*

3. Initialize state/decisions.md

# Decision Log

Key decisions with date, context, rationale, and rejected alternatives.

| Date | Decision | Context / Rationale | Rejected Alternatives |
|------|----------|---------------------|-----------------------|

Use the rejected-alternatives column for meaningful branches, failed hypotheses, and pivots so future sessions can audit the reasoning.

4. Register the commands in CLAUDE.md

Add a session-management section that documents these user-only commands:

## Session Management
| Command | What it does |
|---------|--------------|
| `/start` | Load state, check changes, and give a briefing |
| `/end` | Log the session, update state, propose memory updates, and check Git status |
| `/update` | Save a quick mid-session checkpoint |
| `/today` | Run the morning heartbeat for freshness, deadlines, and memory curation |

5. Use the lifecycle explicitly

Because the skill sets disable-model-invocation: true, Claude does not invoke it ambiently. Run /start when beginning work, /update at meaningful checkpoints, /end before closing, and /today for the daily review. Ensure the project is a Git repository if you want change detection, parallel-session checks, and uncommitted-work reporting.

git status
git log --oneline --since="3 days ago"

Session Management for Claude Code Data Schema & Taxonomy

Project files

Path Purpose Lifecycle
state/current.md Active priorities, open threads, recent completions, and the current Last Updated line Read by /start; updated by /end
state/current-log.md Append-only history of prior Last Updated lines, newest first Created and prepended by /end
state/decisions.md Decision, date, rationale, and rejected-alternative records Read by /start; appended by /end
state/weekly-priorities.md The work that matters during the current week Read by /start; updated when meaningful progress occurs
state/blockers.md External dependencies and recently unblocked items Read by /start; updated by /end when necessary
state/heartbeat-log.md Daily check-in date, commit count, staleness, deadlines, stale items, and memory gaps Read and appended by /today
sessions/{YYYY-MM-DD}.md Daily episodic record of updates and completed session summaries Created and appended by /update and /end

Session log structure

Daily logs contain either quick checkpoint entries or full closing summaries:

## Update: {TIME}
- {brief work summary}

## Session: {TIME}
### Topics
- {topic}
### Decisions
- {decision}
### Open Threads
- {unfinished item}
### Next Actions
- {next step}

Metadata and freshness taxonomy

  • Last Updated: exactly one current timestamp line in current.md; previous lines are moved individually to current-log.md.
  • Freshness thresholds: current.md is stale after 3 days, weekly priorities after 5 days, and blockers after 7 days.
  • Open-thread age: items older than 7 days are flagged for review; items older than 14 days are escalated as likely stale.
  • Deadline window: /today surfaces dated or urgent tasks due within 7 days.
  • Decision metadata: meaningful choices include context, rationale, and rejected alternatives; trivial decisions are omitted.
  • Memory metadata: only durable, verified project knowledge is proposed, while daily work remains in session logs and state files.

Session Management for Claude Code Advanced Features

  • User-only invocation: disable-model-invocation: true keeps this approximately 300-line lifecycle skill out of ambient context and leaves timing under developer control.
  • Four-command lifecycle: /start, /update, /end, and /today cover resumption, checkpointing, closure, and daily maintenance.
  • Append-only chain protocol: prior update lines are stored as separate lines in current-log.md, improving grep behavior, Read-tool compatibility, and merge handling.
  • Parallel-session awareness: /end checks recent commits across branches and warns when another session edited the same files.
  • Git safety controls: uncommitted changes and unpushed commits are reported before closure, while clean repositories remain silent.
  • Approval-gated memory curation: the workflow proposes up to two durable memory additions and waits for a save response instead of writing automatically.
  • Failed-hypothesis tracking: decision records preserve rejected approaches, debugging theories, and strategy pivots to prevent repeated mistakes.
  • Graceful degradation: missing state files can be created, and /today can recover context from recent commits and session logs when /end was skipped.
  • Fast daily operation: the heartbeat is designed to complete in under 60 seconds and skips clean checks to minimize workflow friction.
  • Openclaw Skills compatibility: the structured Markdown-and-Git design makes the skill easy to adopt, inspect, version, and extend within developer automation workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*