session-resume
Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub
Session state tracking and resume protocol for the multi-step agent workflow. USE FOR: resume session, persist progress, checkpoint recovery, session-state.json schema. DO NOT USE FOR: Azure infrastructure, code generation, architecture design, troubleshooting.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Chinorab/session-resumetheir own version, first seen Sep 21, 2026
- ShawnDelaineBellazanLoop/agent-skillsarchivetheir own version, first seen Sep 2, 2026
- iamneilroberts/claude-skillstheir own version, first seen Jul 3, 2026
- eUmeda/session-resumetheir own version, first seen Jun 12, 2026
- devstefancho/skillstheir own version, first seen Feb 10, 2026
- nth5693/gemini-kittheir own version, first seen Jan 22, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- nth5693/gemini-kit★ 373same name
- salavender/antigravity-compound-engineering-plugin★ 48same name
- iamneilroberts/claude-skills★ 26same name
- devstefancho/skills★ 13same name
- ShawnDelaineBellazanLoop/agent-skillsarchive★ 1same name
- Chinorab/session-resume★ 0same name
- ChristopherA/claude_code_tools★ 0same name
- eUmeda/session-resume★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- appinsights-instrumentationSkill
- azure-adrSkill
- azure-aigatewaySkill
- azure-aiSkill
- azure-artifactsSkill
- azure-bicep-patternsSkill
- azure-cloud-migrateSkill
- azure-complianceSkill
- azure-computeSkill
- azure-cost-optimizationSkill
- azure-defaultsSkill
- azure-deploySkill
- azure-diagnosticsSkill
- azure-diagramsSkill
- azure-hosted-copilot-sdkSkill
- azure-kustoSkill
- azure-messagingSkill
- azure-prepareSkill
- azure-quotasSkill
- azure-rbacSkill
- azure-resource-lookupSkill
- azure-resource-visualizerSkill
- azure-storageSkill
- azure-validateSkill
- context-optimizerSkill
- context-shreddingSkill
- copilot-customizationSkill
- count-registrySkill
- docs-writerSkill
- drawioSkill
- entra-app-registrationSkill
- excalidrawSkill
- github-operationsSkill
- golden-principlesSkill
- iac-commonSkill
- make-skill-templateSkill
- mermaidSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-foundrySkill
- microsoft-skill-creatorSkill
- python-diagramsSkill
- terraform-patternsSkill
- terraform-search-importSkill
- terraform-testSkill
- workflow-engineSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 1 is distinctive, and 10 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
All agents MUST enforce schema version at read time:
- Very specific: line 73
On read: Check schema_version field.
- Very specific: line 75
Remove "lock" object if present (no longer used)
- Very specific: line 76
Remove "stale_threshold_ms" if present (no longer used)
- Very specific: line 77
Remove claim objects from all steps if present (no longer used)
- Very specific: line 78
Write the migrated file back atomically (write to .tmp, rename to target, keep .bak)
- Very specific: line 79
On create: Always use "schema_version": "3.0".
- Very specific: line 80
On mismatch: If schema_version is not "3.0", do NOT proceed with step work.
- Very specific: line 85
Before JSON.parse: check file size > 0 bytes
- Very specific: line 86
If parse fails: check for 00-session-state.json.bak — restore if found
- Very specific: line 87
If no backup exists: create fresh state from template, mark all steps pending, log recovery event
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Resume Skill
Persist agent progress to 00-session-state.json and resume from the last
checkpoint after any interruption — mid-step, cross-step, or direct invocation.
When to Use
- Starting / resuming any agent step
- Completing a sub-step checkpoint or finishing a step
- Orchestrator gate transitions
- Recovering after a chat crash or thread switch
Quick Reference
| Concept | Key Detail |
| State file | agent-output/{project}/00-session-state.json |
| Human companion | agent-output/{project}/00-handoff.md |
| Resume detection | Read JSON → check steps.{N}.status → branch accordingly |
| Status values | pending / in_progress / complete / skipped |
| Context budget | Hard limit on files loaded at startup per step (1-3 files) |
| Sub-step tracking | Numbered checkpoint written to sub_step after each phase |
| Write rule | Always overwrite full JSON atomically; always update updated |
Resume Flow (compact)
00-session-state.json exists?
NO → Fresh start (create from template)
YES → steps.{N}.status?
pending → set "in_progress", proceed
in_progress → read sub_step, skip to checkpoint
complete → inform user, offer re-run
skipped → proceed to next stepState Write Moments
- Step start —
status: "in_progress", setstarted - Sub-step done — update
sub_step, appendartifacts, updateupdated - Step done —
status: "complete", setcompleted, clearsub_step - Decision made — add to
decisionsobject - Challenger finding — append/remove in
open_findings
Minimal State Snippet
{
"schema_version": "3.0",
"project": "my-project",
"current_step": 2,
"updated": "2026-03-02T10:15:00Z",
"steps": {
"2": {
"status": "in_progress",
"sub_step": "phase_2_waf",
"artifacts": ["agent-output/my-project/02-architecture-assessment.md"]
}
}
}Schema Version Enforcement (MANDATORY)
All agents MUST enforce schema version at read time:
- On read: Check
schema_versionfield. If"1.0","2.0", or missing → migrate to"3.0"immediately:- Set
"schema_version": "3.0" - Remove
"lock"object if present (no longer used) - Remove
"stale_threshold_ms"if present (no longer used) - Remove
claimobjects from all steps if present (no longer used) - Write the migrated file back atomically (write to
.tmp, rename to target, keep.bak)
- Set
- On create: Always use
"schema_version": "3.0". Never create v1.0 or v2.0 files. - On mismatch: If
schema_versionis not"3.0", do NOT proceed with step work. Migrate first, then proceed.
Corrupt State Recovery
- Before
JSON.parse: check file size > 0 bytes - If parse fails: check for
00-session-state.json.bak— restore if found - If no backup exists: create fresh state from template, mark all steps
pending, log recovery event - Atomic write protocol: write to
.tmpfirst, rename to target, keep.bakof previous version
Reference Index
| Reference | File | Content |
| Recovery Protocol | references/recovery-protocol.md | Resume detection, direct invocation, state write protocol, Orchestrator integration, portability |
| State File Schema | references/state-file-schema.md | Full JSON template (v3.0), field definitions, all step definitions |
| Context Budgets | references/context-budgets.md | Per-step file budget table, all sub-step checkpoint tables (Steps 1-7) |
Concurrency Note
VS Code Copilot executes agents serially — only one agent runs at a time
within a single chat session. The v3.0 schema removed the lock/claim
protocol (previously in v2.0) since concurrent agent execution does not
occur. If two chat sessions target the same project, the last writer wins.
The atomic write protocol (.tmp → rename → .bak) prevents corruption
but does not prevent overwrites.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

