Session Management

Session Management is a skill for Claude Code, Codex from lukacf/meerkat. It costs 16 tokens per session (405 once invoked), scanned A, original, Apache-2.0.

A guide to preserving and restoring conversation sessions using saved runtime state. Session replay rebuilds a conversation from stored events, while compaction shortens older conversation details into summaries.

In plain words
What is it for?
Use it when resuming sessions, recovering after compaction or restart, inspecting saved state, or tuning how much conversation is compacted.
Why use it?
It helps resume work safely and explains how to handle archived sessions, uncertain saved data, and lost context without manually changing internal files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when resuming sessions, recovering after compaction or restart, inspecting saved state, or tuning how much conversation is compacted.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lukacf/meerkat/session-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lukacf/meerkat --skill session-management
Clone the repo
git clone --depth 1 https://github.com/lukacf/meerkat

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Session Management

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukacf/meerkat/session-management/github.svg)](https://agentmods.dev/skills/lukacf/meerkat/session-management)
Your own site
<a href="https://agentmods.dev/skills/lukacf/meerkat/session-management"><img src="https://agentmods.dev/badge/skills/lukacf/meerkat/session-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Session Management

Your own site · 80×15
<a href="https://agentmods.dev/skills/lukacf/meerkat/session-management"><img src="https://agentmods.dev/badge/skills/lukacf/meerkat/session-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 405 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00405
Opus 5.5 $0.00006 $0.00162
Sonnet 5.5 $0.00003 $0.00081
Haiku 4.5 $0.00002 $0.00040

Measured 1mo ago against content hash 96d10afb7975, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Session Management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

crates/meerkat-session/skills/session-management/SKILL.md · 43 lines

What it actually says

Session Management

Use session management guidance when resuming, inspecting, or reasoning about a conversation's persisted runtime state.

Operating Rules

  • Resume with the session_id from a previous run. The runtime rebuilds the session from durable state when persistence is enabled.
  • Treat event logs, catalogs, and projection files as derived. A current Session is domain-only conversation and metadata; the store issues the physical authority used to commit or recover it. Never repair state with ad hoc file edits.
  • An archived session is lifecycle-terminal and is not an ordinary resume target. Durable-tail recovery can also hold or quarantine a resume when the persisted evidence is ambiguous; preserve the data and surface the typed failure instead of fabricating a repair.
  • Compaction may replace old transcript detail with summaries. Use skills, memory, files, and WorkGraph to recover relevant context when needed.
  • System messages are ordinary ordered transcript messages. They may repeat at turn boundaries; do not assume there is one mutable system-prompt slot.
  • Host-injected context is a typed, separate user-channel message delivered immediately before the turn input. It is excluded from memory indexing and is not a free-form transcript role.
  • Session persistence preserves conversation continuity. It does not replace WorkGraph for shared durable work or Schedule for future wakeups.

Compaction

  • Lower thresholds compact more often and reduce live context.
  • Higher thresholds preserve more live context but cost more tokens.
  • Compaction summaries are typed runtime-minted messages. Hosts and transcript rewrite callers cannot mint that role, and summaries are not re-indexed into memory.
  • If compaction causes ambiguity, inspect durable artifacts or ask for the missing detail instead of inventing it.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 43 lines · 16 tokens per session scan A 96d10afb7975

Subscribe to this mod's changes

Session Management is a skill published in the GitHub repository lukacf/meerkat (23 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 405 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

proactive-agent

Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer, Autonomous Crons, and battle-tested patterns. Part of the Hal Stack 🦞.

MerkyorLynn/Lynn · 46 tokens

memory-recall

Persistent cross-session memory system with fact extraction, semantic search, and compiled memory layers. Your agent remembers everything across sessions — user preferences, project context, past decisions, personal details. Use when: (1) User references something from a previous conversation, (2) Agent needs project…

MerkyorLynn/Lynn · 104 tokens

session-checkpoint

Re-orient a long, dense, or interruption-prone agent session without replacing the underlying evidence. Use when the user asks for a recap, orientation, simple teaching explanation, or spoken summary; when a session has accumulated many turns or tool calls; before context compaction; or when a Brief-Spec hook says a…

luanmorenommaciel/brief-spec · 72 tokens

memory-continuity

Preserves cross-session continuity with deterministic MEMORY.md, index.md, and snapshot handoffs under .agentic/memories/.

soulcodex/agentic · 30 tokens

plan-memory-index

Maintains concise indexed memory entries for applied plans under .agentic/memories/ with clear boundaries between memory and plan sources. Memory retrieval is prioritized before loading historical plan files.

soulcodex/agentic · 40 tokens

llm-wiki

Karpathy's LLM Wiki: build/query interlinked markdown KB.

StarryCod/cogitum · 19 tokens