codex-sessions-manager

Audit and clean local Codex session residues under a specified root.

12|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/1939869736luosi/codex-sessions-manager --skill codex-sessions-manager
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-sessions-manager
Source: https://github.com/1939869736luosi/codex-sessions-manager/tree/main
Command: npx skills add https://github.com/1939869736luosi/codex-sessions-manager --skill codex-sessions-manager

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codex Desktop deletes archived chats, but it can leave behind local residues across files, JSONL indexes, SQLite rows, and global-state references, making it hard to prove what remains and to clean it safely.

Core Features & Use Cases

  • Local audit & residue verification: Inspect what still exists under a Codex root (e.g., ~/.codex) for a specific session ID, including missing family edges and storage surfaces.
  • Root-wide residue scanning & batch previews: Find likely leftovers without requiring you to know the session ID first, then preview what deletion would touch.
  • Safety-first cleanup workflows: Export backups, generate read-only deletion plans, preview delete/trash actions, delete with explicit confirmation, and verify that nothing is left behind.

Quick Start

Use this skill to ask: "Audit session <session-id> under root ~/.codex and tell me the next safe preview command to remove local orphans."

Frequently Asked Questions about codex-sessions-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up leftover Codex session files after deleting archived chats?

To clean up Codex session residues, audit the local Codex root directory to find orphaned files, JSONL indexes, and SQLite rows, then execute safe delete or trash operations with explicit confirmation to remove the leftovers completely.

What is Codex local session residue and why does it remain after archiving chats?

Codex local session residue consists of leftover files, JSONL indexes, SQLite rows, and global-state references that remain under a Codex root because the Desktop archive or delete process does not fully purge all local storage surfaces.

How do I scan my Codex root directory to find session leftovers without knowing the session ID?

Scan your Codex root directory using a root-wide residue scanning tool to automatically find likely leftover session candidates, preview what deletion would touch, and generate read-only deletion plans without needing the specific session ID first.

Can I safely restore a deleted Codex session if I make a mistake during cleanup?

Yes, you can safely restore a deleted Codex session because the cleanup workflow supports exporting backups and using a trash mechanism, allowing you to restore sessions and verify that no data is permanently lost during the audit process.

Does the Codex session audit process require a local MCP server and CLI to run?

Yes, the Codex session audit process requires YAML-driven skill activation instructions that coordinate a local CLI and MCP stdio server to perform read-only audit planning and execute explicit-confirmation write actions safely.

What is the safest way to verify nothing is left behind after purging Codex session data?

The safest way to verify nothing is left behind after purging Codex session data is to inspect the specific session ID for missing family edges and storage surfaces, then run a post-deletion SQLite verification to confirm complete removal.