alive:session-context-rebuild

alive:session-context-rebuild is a skill for Claude Code, Codex from alivecontext/alive. It costs 72 tokens per session (1,636 once invoked), scanned A, original, MIT.

A workflow for rebuilding the working context of a project from several coding-agent sessions. It reads touched files and session history, then identifies conflicting decisions or unfinished work.

In plain words
What is it for?
Use it when resuming a project after days away or when you need to merge and reconcile work from multiple sessions.
Why use it?
It helps recover accurately after a long absence, lost context, or parallel sessions that may have changed the same files.

Skill for Claude CodeCodex

Part of the alive plugin — 17 skills, 5 hooks shipped together

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.

agentmods
npx agentmods add skills/alivecontext/alive/session-context-rebuild
Any agent
npx skills add alivecontext/alive --skill session-context-rebuild
Clone the repo
git clone --depth 1 https://github.com/alivecontext/alive

Made for: Claude Code, Codex.

Or install alive, the plugin that ships this one along with the rest of its 17 skills, 5 hooks.

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 alive:session-context-rebuild

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivecontext/alive/session-context-rebuild.svg)](https://agentmods.dev/skills/alivecontext/alive/session-context-rebuild)
Your own site
<a href="https://agentmods.dev/skills/alivecontext/alive/session-context-rebuild"><img src="https://agentmods.dev/badge/skills/alivecontext/alive/session-context-rebuild.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00072 $0.01636
Opus 5 $0.00036 $0.00818
Sonnet 5 $0.00014 $0.00327
Haiku 4.5 $0.00007 $0.00164

Measured 5d ago against content hash 9df1f94275fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

alive:session-context-rebuild 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 5d 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.

plugins/alive/skills/session-context-rebuild/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Context Rebuild

You're returning to work that spans multiple sessions — possibly conflicting ones. The context window is empty but the walnut isn't. This skill dispatches subagents to deeply reconstruct what happened, what changed, where conflicts exist, and what the merged state should be. Then you resume with full context as if you never left.


When to Use

  • Returning to a walnut after days/weeks away
  • Context was lost to compaction mid-session
  • Multiple sessions touched the same walnut in parallel and need merging
  • Picking up someone else's work in a shared walnut
  • "What was I doing here?" moments

Process

Phase 1: Scout (single agent)

Dispatch one general-purpose subagent to map the territory. It reads the session-history/SKILL.md file and applies its browse logic against .alive/_squirrels/, then reports back:

  • Which sessions touched this walnut, when, by whom (engine)
  • Which files each session worked on (working: field in squirrel YAML)
  • Which bundles were active
  • Whether sessions overlap (parallel/conflicting work)
  • Unsaved stash items from crashed sessions

Cross-walnut detection: the scout performs two queries, not one:

  1. Walnut-tagged match — squirrel YAMLs where walnut: {target} (the obvious set)
  2. Routed-stash match — squirrel YAMLs where any stash item's routed: field contains the target walnut name (catches maintenance sessions with walnut: null that routed work to this walnut)

Merge-deduplicate by session_id. Report both counts so the user sees "5 walnut-tagged + 1 cross-walnut routed" instead of just "5 sessions."

╭─ 🐿️ context rebuild — scouting
│  Found 5 sessions on this walnut (last 2 weeks)
│  3 sequential, 2 overlapping (possible conflicts)
│  12 files touched, 2 bundles active
│
│  ▸ Rebuild scope?
│  1. All 5 sessions (full rebuild)
│  2. Last 3 only
│  3. Just the 2 conflicting sessions
╰─

Phase 2: Deep Read (agent swarm)

Based on scope, dispatch parallel subagents — one per session or one per domain:

Read the full file on GitHub · 154 lines

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. 5d ago First seen · 154 lines · 72 tokens per session scan A 9df1f94275fb

Subscribe to this mod's changes

alive:session-context-rebuild is a skill published in the GitHub repository alivecontext/alive (127 stars, last pushed 9d ago), licensed MIT. It adds 72 tokens to every session and 1,636 once invoked, about $0.0004 per session on Opus 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.