gitmyhub

Resume-failed-compaction

Python ★ 16 updated 15d ago

A read-only Codex skill that scans your local session files after a failed context-compression event, finds the interrupted session, and gives a fresh AI thread a summary so it can pick up exactly where the work stopped.

Pythonsetup: easycomplexity 1/5

Resume Failed Compaction is a skill for Codex, OpenAI's AI coding agent. It solves a specific problem: when an AI coding session runs long, the agent tries to compress its conversation history to stay within memory limits. If that compression process fails or drops important context, the next thread the agent starts has no idea where the previous session left off, and work gets lost.

This tool addresses that by scanning your local Codex session files and logs. It looks at the JSONL files and TUI logs that Codex writes to your computer, identifies which session most likely got interrupted by a failed compaction, and generates a short summary. That summary is designed to be handed to a fresh Codex thread so it can continue the actual task rather than starting from scratch.

The scanner is read-only. It does not modify session files, delete logs, or touch your repository. It assigns each candidate session a confidence score and provides a human-readable explanation of why it thinks that session failed. The summary it produces covers recent user requests, assistant replies, tool calls, the working directory, and token pressure at the point of failure.

Installation means copying the folder into your Codex skills directory. On Mac or Linux that is a single cp command. On Windows there is a PowerShell equivalent. Once installed, you ask Codex to use the skill by name and it runs the scanner, finds the most likely interrupted session, and uses the recovery summary to pick up from where the work stopped.

The project is MIT-licensed and the README includes both English and Chinese descriptions of what it does.

Where it fits