/context-restore
Read a checkpoint file (written by /context-save) into a fresh session. Outputs a concise summary so you can pick up cold. The former cross-session dump skill is folded into this one — its old name routes here via config/aliases.yaml.
When to use
- Starting a fresh session that continues yesterday's (or a teammate's) in-flight work
- After
/clean led you to restart with reduced context
- When picking up a checkpoint shared by another SE on the team
When NOT to use
- Starting fresh on a NEW task — there's no checkpoint to read
- Pure question / lookup — you don't need state restoration
Inputs
- Optional argument: path to a specific checkpoint file.
- No argument: skill auto-discovers the most recent checkpoint for the current slug + branch.
Workflow
Resolve slug + branch via _context_repo_slug and _context_branch from bin/_context.sh; both use the selected target repository.
Find checkpoint via the mechanical core (no raw ls/find):
source "${LINTEL_SOURCE_ROOT:-$LINTEL_REPO_ROOT}/bin/_context.sh" # fallback: "${LINTEL_SOURCE_ROOT:-$(git rev-parse --show-toplevel)}/bin/_context.sh"
path=$(context_latest) # newest checkpoint for the current branch
context_list [branch] # all checkpoints newest-first, when the operator wants to pick one
- If argument provided: validate the path exists, read it (skip discovery).
- Else: read
$(context_latest). Discovery includes only legacy files whose repository key or explicit **Repository:** line matches this repository (read-only; grace window to 2026-09-12). Unattributed legacy files remain available through an explicitly selected path; never infer ownership from the branch or basename alone.
Parse checkpoint structure — extract: task description, done, in-flight, next, decisions, failed attempts, files touched.
Read referenced files — for each file under "Files touched," Read it so subsequent edits land on accurate state (post-checkpoint changes may exist).
Diff check — git log <last-commit-in-checkpoint>..HEAD to surface any commits landed since checkpoint was written.
Print restoration summary.
Report format
✓ Restored from <path>
Original timestamp: <ISO>
Slug/branch: <slug>/<branch>
Last commit at save: <sha> (now: <current-sha> — <N commits since>)
## Task
<one-line>
## Where we were
- Done: <count> items
- In-flight: <count> items — <first item summary>
- Next: <count> steps — <first step summary>
## Important context
- <decision summaries, max 5>
- <failed attempts to avoid, max 3>
## Files in-flight
<list>
## Ready to continue
Suggested next action: <verbatim "next" step #1 from checkpoint>
Edge cases
- No checkpoint found: report "no checkpoint for /. Start fresh or specify --path." Don't error — just inform.
- Checkpoint references files that no longer exist: flag each missing file, don't fail. Operator decides if it matters.
- Commits landed since checkpoint: state count + suggest
git log <checkpoint-sha>..HEAD to review.
- Checkpoint older than 7 days: warn — "stale checkpoint, project state may have drifted significantly."
- Multiple branches share checkpoints (rebase happened): restore reads only checkpoints matching the current branch name.
Compliance integration
- This skill READS a file outside the repo. The file may contain decisions, failed attempts, file paths.
- Operator confirms the checkpoint is theirs (or shared with them by an authorized teammate) before reading. Sharing checkpoints across SEs is fine for same project; cross-customer checkpoints are NOT fine.
Failure modes
- Checkpoint file unreadable: report error, suggest operator pastes content inline as fallback.
- Slug/branch mismatch: the checkpoint was for a different project. Surface, ask operator if they want to continue anyway.
- Files referenced moved/renamed since checkpoint: flag, operator clarifies new paths.
Examples
Auto-discover latest:
> /context-restore
✓ Restored from .claude/runtime/sessions/main/20260527-153022-lintel-phase-2-skills-batch-1-context-save.md
Original timestamp: 2026-05-27T15:30:22Z
Slug/branch: lintel/main
Last commit at save: 7e7a021 (now: 7e7a021 — 0 commits since)
## Task
Phase 2 internal-voice skills, batch 1 (5 skills)
## Where we were
- Done: 2 items (Phase 1, voice eval skeletons)
- In-flight: 1 item — writing 5 operational skills
- Next: 3 steps — finish remaining skills, commit, push
## Files in-flight
- scaffolding/01-foundation/skills/context-save/SKILL.md
- scaffolding/01-foundation/skills/context-restore/SKILL.md
## Ready to continue
Suggested next action: complete /clean, /help, /health skills
With explicit path:
> /context-restore .claude/runtime/sessions/main/20260526-225146-lintel-context-save.md
...
See also
/context-save — write the checkpoint this skill reads
/li:resume — paired with this skill: resume discovers context-save checkpoints (newest-first via context_latest) and, when no cycle ledger exists, routes the operator here with /li:context-restore <path>
/clean — companion self-maintenance command
1---2name: context-restore3description: Use at the start of a fresh session that continues prior work to restore session state from a checkpoint file. Reach for it when a previous session saved a checkpoint and you want to resume with that context loaded rather than starting cold.4---56# /context-restore78Read a checkpoint file (written by `/context-save`) into a fresh session. Outputs a concise summary so you can pick up cold. The former cross-session dump skill is folded into this one — its old name routes here via `config/aliases.yaml`.910## When to use1112- Starting a fresh session that continues yesterday's (or a teammate's) in-flight work13- After `/clean` led you to restart with reduced context14- When picking up a checkpoint shared by another SE on the team1516## When NOT to use1718- Starting fresh on a NEW task — there's no checkpoint to read19- Pure question / lookup — you don't need state restoration2021## Inputs2223- **Optional argument:** path to a specific checkpoint file.24- **No argument:** skill auto-discovers the most recent checkpoint for the current slug + branch.2526## Workflow27281. **Resolve slug + branch** via `_context_repo_slug` and `_context_branch` from `bin/_context.sh`; both use the selected target repository.292. **Find checkpoint** via the mechanical core (no raw `ls`/`find`):3031 ```bash32 source "${LINTEL_SOURCE_ROOT:-$LINTEL_REPO_ROOT}/bin/_context.sh" # fallback: "${LINTEL_SOURCE_ROOT:-$(git rev-parse --show-toplevel)}/bin/_context.sh"33 path=$(context_latest) # newest checkpoint for the current branch34 context_list [branch] # all checkpoints newest-first, when the operator wants to pick one35 ```3637 - If argument provided: validate the path exists, read it (skip discovery).38 - Else: read `$(context_latest)`. Discovery includes only legacy files whose repository key or explicit `**Repository:**` line matches this repository (read-only; grace window to 2026-09-12). Unattributed legacy files remain available through an explicitly selected path; never infer ownership from the branch or basename alone.393. **Parse checkpoint structure** — extract: task description, done, in-flight, next, decisions, failed attempts, files touched.404. **Read referenced files** — for each file under "Files touched," `Read` it so subsequent edits land on accurate state (post-checkpoint changes may exist).415. **Diff check** — `git log <last-commit-in-checkpoint>..HEAD` to surface any commits landed since checkpoint was written.426. **Print restoration summary.**4344## Report format4546```47✓ Restored from <path>48 Original timestamp: <ISO>49 Slug/branch: <slug>/<branch>50 Last commit at save: <sha> (now: <current-sha> — <N commits since>)5152## Task53<one-line>5455## Where we were56- Done: <count> items57- In-flight: <count> items — <first item summary>58- Next: <count> steps — <first step summary>5960## Important context61- <decision summaries, max 5>62- <failed attempts to avoid, max 3>6364## Files in-flight65<list>6667## Ready to continue68Suggested next action: <verbatim "next" step #1 from checkpoint>69```7071## Edge cases7273- **No checkpoint found:** report "no checkpoint for <slug>/<branch>. Start fresh or specify --path." Don't error — just inform.74- **Checkpoint references files that no longer exist:** flag each missing file, don't fail. Operator decides if it matters.75- **Commits landed since checkpoint:** state count + suggest `git log <checkpoint-sha>..HEAD` to review.76- **Checkpoint older than 7 days:** warn — "stale checkpoint, project state may have drifted significantly."77- **Multiple branches share checkpoints (rebase happened):** restore reads only checkpoints matching the current branch name.7879## Compliance integration8081- This skill READS a file outside the repo. The file may contain decisions, failed attempts, file paths.82- Operator confirms the checkpoint is theirs (or shared with them by an authorized teammate) before reading. Sharing checkpoints across SEs is fine for same project; cross-customer checkpoints are NOT fine.8384## Failure modes8586- **Checkpoint file unreadable:** report error, suggest operator pastes content inline as fallback.87- **Slug/branch mismatch:** the checkpoint was for a different project. Surface, ask operator if they want to continue anyway.88- **Files referenced moved/renamed since checkpoint:** flag, operator clarifies new paths.8990## Examples9192**Auto-discover latest:**93```94> /context-restore95✓ Restored from .claude/runtime/sessions/main/20260527-153022-lintel-phase-2-skills-batch-1-context-save.md96 Original timestamp: 2026-05-27T15:30:22Z97 Slug/branch: lintel/main98 Last commit at save: 7e7a021 (now: 7e7a021 — 0 commits since)99100## Task101Phase 2 internal-voice skills, batch 1 (5 skills)102103## Where we were104- Done: 2 items (Phase 1, voice eval skeletons)105- In-flight: 1 item — writing 5 operational skills106- Next: 3 steps — finish remaining skills, commit, push107108## Files in-flight109- scaffolding/01-foundation/skills/context-save/SKILL.md110- scaffolding/01-foundation/skills/context-restore/SKILL.md111112## Ready to continue113Suggested next action: complete /clean, /help, /health skills114```115116**With explicit path:**117```118> /context-restore .claude/runtime/sessions/main/20260526-225146-lintel-context-save.md119...120```121122## See also123124- `/context-save` — write the checkpoint this skill reads125- `/li:resume` — **paired with this skill**: resume discovers context-save checkpoints (newest-first via `context_latest`) and, when no cycle ledger exists, routes the operator here with `/li:context-restore <path>`126- `/clean` — companion self-maintenance command