session-continuity
Skill1 starsChanged 4 months agoMITView on GitHub
Automated cross-session continuity for Codex workstreams. Use when the user wants to continue work across sessions, checkpoint or resume a long Codex conversation, avoid manual summaries when context is long, create or validate a handoff/bootstrap package, recover from "continue previous session", "换会话继续", "自动续航", "上下文快满", "checkpoint", "handoff", "resume", or integrate continuity with the Codex + Claude + Gemini tri-party framework.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- talgolan/session-continuitytheir own version, first seen Nov 8, 2026
- ericwang200608-beep/LANYANT-Skillstheir own version, first seen Nov 8, 2026
- potentiavision/partner-jarvis-startertheir own version, first seen Jul 25, 2026
- ehm-hub/claude-skillstheir own version, first seen May 20, 2026
- martinsbash/claude-skillstheir own version, first seen Apr 17, 2026
- TheArcitect/claude-skillstheir own version, first seen Feb 23, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- ericwang200608-beep/LANYANT-Skills★ 2same name
- TheArcitect/claude-skills★ 2same name
- martinsbash/claude-skills★ 1same name
- DONGHO5270/mcp-management-system★ 0same name
- ehm-hub/claude-skills★ 0same name
- potentiavision/partner-jarvis-starter★ 0same name
- talgolan/session-continuity★ 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.
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 12 are distinctive, and 16 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Checkpoint: create or update continuity state for the current session.
- Distinctive: line 20
Targeted handoff: create a next-session handoff for one selected goal or content slice, without carrying the whole session.
- Distinctive: line 26
Run the bundled scripts from this skill rather than rewriting checkpoint logic.
- Distinctive: line 31
Use this when the user wants automatic session rollover, says the current Codex context is long, asks to "新建会话接入", or invokes the slash …
- Very specific: line 33
Run checkpoint.py or sc save for the current workspace.
- Very specific: line 34
Run validate.py or sc v. Stop if hash, redaction, or active-lock validation fails.
- Very specific: line 36
If Codex App thread tools are available, call create_thread with the bootstrap as the initial prompt.
- Very specific: line 37
Prefer a project/local target when a valid project id is available.
- Very specific: line 38
After a successful create_thread, emit the required ::created-thread{...} directive in the final response and include the human-readable …
- Distinctive: line 39
If thread tools are unavailable, return the bootstrap text and label the result as "manual thread creation required".
- Very specific: line 52
Use this during long-running work at phase boundaries, after major evidence, before long Figma/codegen/probe loops, and before final …
- Distinctive: line 84
Use this when the user wants to carry forward only a selected topic, target, file, issue, PR, design, or decision set instead of the whole …
- Distinctive: line 86
Ask or infer the target scope: what content is included, what is excluded, and what the next session should do.
- Very specific: line 88
Write the targeted state under .agent/continuity/targets/<target>/.
- Distinctive: line 90
If thread tools are available, create the new Codex thread from that targeted bootstrap.
- Distinctive: line 105
Use these from any project root:
- Very specific: line 150
All scripts accept --root <path> to target another workspace.
- Distinctive: line 154
Every resume must check these gates:
- Very specific: line 164
If hash_status or redaction_status fails, stop and explain the failure.
- Very specific: line 166
If review_status is partial, label the restored context as partial.
- Distinctive: line 170
When the active workstream is governed by the Codex + Claude + Gemini framework:
- Distinctive: line 172
Prefer running the tri-party review before finalizing a major checkpoint.
- Very specific: line 175
Keep probe_status and review_status separate.
- Very specific: line 177
Read references/triparty.md only when tri-party status or review provenance matters.
- Very specific: line 183
Use monotonic revision; updated_at alone is not enough for concurrency safety.
- Very specific: line 184
Keep a single writer lock under .agent/continuity/locks/writer.lock.
- Very specific: line 186
Keep detailed schemas in references/schema.md.
- Very specific: line 190
Read references/failure-modes.md when validation fails or the user asks why auto-resume is blocked.
“Common” is measured: kept by at least 6 in 10 of the 6 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 Continuity
Purpose
Turn manual "summarize this session, open a new session, paste the summary" work into a file-backed checkpoint and resume workflow.
Authoritative state must live in .agent/continuity/, not in chat history. Do not claim a restored session is trustworthy until validation passes.
Workflow
- Locate the workstream root. Use the current working directory unless the user names another workspace.
- Inspect existing
.agent/continuity/current.yml,manifest.json, andhandoff.mdif present. - Choose the operation:
- Checkpoint: create or update continuity state for the current session.
- Targeted handoff: create a next-session handoff for one selected goal or content slice, without carrying the whole session.
- Resume: validate and load the latest handoff, then continue from it.
- Guard: evaluate context pressure and decide whether to watch, checkpoint, or roll over.
- New thread handoff: checkpoint, validate, create a new Codex thread, and send the bootstrap there.
- Validate: audit the handoff without changing it.
- Redact: sanitize text before it enters any continuity file.
- Run the bundled scripts from this skill rather than rewriting checkpoint logic.
- Report the validation status, key paths, and any gate that is not ready.
New Thread Handoff
Use this when the user wants automatic session rollover, says the current Codex context is long, asks to "新建会话接入", or invokes the slash palette entry expecting continuity.
- Run
checkpoint.pyorsc savefor the current workspace. - Run
validate.pyorsc v. Stop if hash, redaction, or active-lock validation fails. - Generate bootstrap text with
bootstrap.pyorsc b. - If Codex App thread tools are available, call
create_threadwith the bootstrap as the initial prompt. - Prefer a project/local target when a valid project id is available. If no project id is discoverable, create a projectless thread and include the absolute workspace root in the prompt so the new thread can resume from
.agent/continuity/. - After a successful
create_thread, emit the required::created-thread{...}directive in the final response and include the human-readable thread id. - If thread tools are unavailable, return the bootstrap text and label the result as "manual thread creation required".
The new thread prompt should tell the next session to run:
sc v
sc hThen continue from .agent/continuity/handoff.md.
Automatic Rollover Guard
Use this during long-running work at phase boundaries, after major evidence, before long Figma/codegen/probe loops, and before final reporting.
The guard reads the current Codex rollout log when CODEX_THREAD_ID is available, then combines:
token_countcontext ratio when present.- fallback signals such as compaction markers, large session logs, large tool outputs, declared large reads, phase boundaries, major evidence, long-loop warnings, artifacts, and blocked items.
Shortcut commands:
sc context
sc maybe-rollover --latest-user-request "..." --active-goal "..." --next-task "..."
sc rollover --target "target name" --latest-user-request "..." --active-goal "..." --next-task "..."Statuses are:
ok: keep working.watch: context pressure is visible; avoid broad new reads.checkpoint_recommended: write or refresh.agent/continuity/.rollover_required: stop expanding the current session, checkpoint, validate, generaterollover-request.json, and create or fork a fresh thread when thread tools are available.
rollover-request.json is a creation request, not proof that a thread exists. After a successful create_thread or fork_thread, record the result:
sc receipt --created-thread-id "<thread-id>"If thread tools are unavailable, return the request path and label the result as manual thread creation required. Never claim automatic rollover succeeded until thread-receipt.json contains the created thread id or pending worktree id and was recorded against a ready rollover-request.json whose revision and bootstrap hash still match the current continuity package.
Targeted Handoff
Use this when the user wants to carry forward only a selected topic, target, file, issue, PR, design, or decision set instead of the whole current session.
- Ask or infer the target scope: what content is included, what is excluded, and what the next session should do.
- Summarize only durable facts for that target. Do not include unrelated current-session history.
- Write the targeted state under
.agent/continuity/targets/<target>/. - Generate the new-thread bootstrap from that target by passing
--target <target>. - If thread tools are available, create the new Codex thread from that targeted bootstrap.
Shortcut:
sc target "target name" "target summary" "next task"
sc v --target "target name"
sc b --target "target name"
sc h --target "target name"For slash usage, the user can say: "只针对 <目标> 生成下个会话待办". Treat that as targeted handoff.
Script Commands
Use these from any project root:
Codex slash palette:
- Type
/. - Choose
Session Continuity. - The inserted prompt checkpoints the workspace and creates a new Codex thread when thread tools are available.
Shortcut commands are installed when available:
sc save "latest request" "active goal" "next task"
sc target "target name" "target summary" "next task"
sc v
sc b
sc h
sc context
sc maybe-rollover
sc rollover
sc receipt --created-thread-id "<thread-id>"
sc testsc defaults to the git root when available, otherwise the current directory. Set SESSION_CONTINUITY_ROOT=/path/to/workspace to override.
Equivalent global command names, when installed: sc, session-continuity, and codex-continuity.
python3 ~/.codex/skills/session-continuity/scripts/checkpoint.py \
--workstream "name" \
--latest-user-request "what the user asked" \
--active-goal "current objective" \
--decision "stable fact or decision" \
--open-task "next action"python3 ~/.codex/skills/session-continuity/scripts/validate.py
python3 ~/.codex/skills/session-continuity/scripts/bootstrap.py
python3 ~/.codex/skills/session-continuity/scripts/guard.py
python3 ~/.codex/skills/session-continuity/scripts/thread_receipt.py --created-thread-id "<thread-id>"
python3 ~/.codex/skills/session-continuity/scripts/redact.py --text "raw text"
python3 ~/.codex/skills/session-continuity/scripts/self_test.pyAll scripts accept --root <path> to target another workspace.
Gates
Every resume must check these gates:
| Gate | Required value | Meaning |
probe_status | passed | Continuity files exist and can be read. |
redaction_status | passed | No obvious secrets were written. |
hash_status | passed | Manifest hashes match current files. |
review_status | passed, partial, or not_required | Tri-party or local review state is explicit. |
bootstrap_status | ready | bootstrap.md can be used to start a new session. |
If hash_status or redaction_status fails, stop and explain the failure. Do not resume from unsafe state.
If review_status is partial, label the restored context as partial. Do not call it a true tri-party result.
Tri-party Integration
When the active workstream is governed by the Codex + Claude + Gemini framework:
- Prefer running the tri-party review before finalizing a major checkpoint.
- Pass
--triparty-run-dir <run-dir>tocheckpoint.pywhen a run directory exists. - Preserve Claude/Gemini outputs as evidence paths; never replace them with Codex summaries.
- Keep
probe_statusandreview_statusseparate. File existence is not review completion.
Read references/triparty.md only when tri-party status or review provenance matters.
State Rules
- Store durable facts, not full chat logs.
- Redact before writing.
- Use monotonic
revision;updated_atalone is not enough for concurrency safety. - Keep a single writer lock under
.agent/continuity/locks/writer.lock. - Record hashes in
manifest.json. - Keep detailed schemas in
references/schema.md.
Failure Rules
Read references/failure-modes.md when validation fails or the user asks why auto-resume is blocked.
Common hard stops:
- Missing or stale lock from another active writer.
- Hash mismatch after a checkpoint.
- Suspected secret in any continuity file.
- Missing
current.ymlor unreadable manifest. - Tri-party workstream claims true synthesis without completed Claude and Gemini evidence.
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.

