codex-session-recovery
Skill1 starsChanged 4 days agoMITView on GitHub
Find local Codex sessions read-only and provide CLI recovery commands. Use for missing history, prior thread lookup, resume or fork help, and explicitly requested Desktop visibility.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- lachlanchen/LazySkillstheir own version, first seen Jun 6, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- lachlanchen/LazySkills★ 1same 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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- game-experience-reviewSkill
- image-quality-controlSkill
- reference-image-promptSkill
- suno-createSkill
- suno-music-explorerSkill
- suno-studio-downloadSkill
- consensus-change-reviewSkill
- consensus-review-loopSkill
- delegated-change-reviewSkill
- docs-context-curatorSkill
- godot-silent-reviewSkill
- implement-in-stagesSkill
- improve-code-commentsSkill
- review-gated-implementationSkill
- review-loopSkill
- review-testsSkill
- codex-thread-reportSkill
- consensus-gated-grillingSkill
- grillingSkill
- opencode-session-toolkitSkill
- review-gated-grillingSkill
- sanitize-artifactsSkill
- skill-manual-onlySkill
- wait-whatSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Read local Codex JSONL only.
- Very specific: line 15
Never edit $CODEX_HOME, SQLite-backed state, rollout files, or provider or account metadata.
- Distinctive: line 16
Do not create or manage Desktop threads unless the user explicitly requests Desktop visibility.
- Very specific: line 20
Use the bundled scanner. Resolve <skill-directory> from this loaded skill's location.
- Very specific: line 39
Use --help for all options.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex Session Recovery
Recover access to local Codex history without mutating live state by default.
Safety
- Read local Codex JSONL only. Prefer copied fixtures or temporary copies for testing.
- Exclude archived and subagent sessions unless requested. Show only short prompt snippets unless the user requests more.
- Never edit
$CODEX_HOME, SQLite-backed state, rollout files, or provider or account metadata. Never copy or import JSONL into live Codex state. - Do not create or manage Desktop threads unless the user explicitly requests Desktop visibility. A Codex Desktop context is not enough.
Find sessions
Use the bundled scanner. Resolve <skill-directory> from this loaded skill's location; do not assume it is installed under $CODEX_HOME/skills.
python "<skill-directory>/scripts/scan_codex_sessions.py" \
--codex-home "${CODEX_HOME:-$HOME/.codex}" \
--cwd "/Users/example/project" \
--since "2026-06-10" \
--timezone "Asia/Shanghai" \
--format tableFrom this repository checkout:
python skills/productivity/codex-session-recovery/scripts/scan_codex_sessions.py \
--codex-home /tmp/copied-codex-home \
--format jsonUse --help for all options. The main filters are --cwd, --since, --until, --timezone, and --query; archived sessions, subagents, prompt snippets, unknown-time records under date filters, and index-referenced paths require explicit flags (--include-archived, --include-subagents, --show-prompts, --include-unknown-time, and --show-paths). Prefer JSON when another tool consumes the result.
The index or transcript filename provides the canonical thread id; other observed id, thread_id, or session_id values are reported as aliases and merged into that record. Report its thread name, cwd, time, archived or subagent status, match_score and matching_reasons as given, source path, and exact codex resume and codex fork commands. The score ranks candidates within one search; it is not a probability or percentage and may exceed 100. The JSON field was renamed from confidence to match_score, with no old-field alias. If nothing matches, state the filters and suggest relaxing one at a time.
Desktop visibility
A Codex Desktop context is not enough. When the user explicitly requests Desktop visibility and the candidate is unique or already selected, follow references/desktop.md. If the candidate is ambiguous, ask the user to choose first. Otherwise remain CLI-first.
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.

