save-state

Save the current Codex session state to a JSON snapshot in ~/.codex/compact-saves/.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/FrogAi/Xenopus --skill save-state-frogai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: save-state
Source: https://github.com/FrogAi/Xenopus/tree/main/Codex/Skills/GPT%205.4/save-state
Command: npx skills add https://github.com/FrogAi/Xenopus --skill save-state-frogai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codex session contexts can grow and drift, making it hard to recover a useful state after context compaction. This skill lets you manually save the current Codex session state to a JSON snapshot for later restoration.

Core Features & Use Cases

  • Manual capture: Save the current session state (todo / plan / git / recent files / scheduled tasks / phase marker) as a versioned JSON snapshot under ~/.codex/compact-saves/.
  • Explicit restoration point: Restore a previously saved snapshot to resume work after context changes.
  • Trigger flexibility: Invoke via /save-state or natural-language prompts to create a snapshot at critical moments.

Quick Start

Invoke /save-state to capture and save your current Codex session to ~/.codex/compact-saves/.

Frequently Asked Questions about save-state

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

FAQPage Schema
How do I save my Codex session state before context compaction?

You can manually save your Codex session state by invoking the /save-state command, which captures your todo list, plan, git status, and recent files into a JSON snapshot for later restoration.

What is a Codex context snapshot and when do I need one?

A Codex context snapshot is a versioned JSON file preserving your session's todo, plan, and git state. You need one before context compaction, during long-running workflows, or for cross-session project handoffs.

Can I restore a Codex session from a JSON snapshot after context changes?

Yes, you can restore a previously saved snapshot to resume work after context changes. The Skill provides an explicit restoration point to recover your session state from the saved JSON file.

Does this session management tool require any dependencies to capture workflows?

No external dependencies are required. The Skill relies on a local shell script within your existing Codex setup to extract session data and write it to the compact-saves directory.

How do I manually trigger a context save in Codex using natural language?

You can trigger a context save by typing /save-state or using natural-language prompts. This flexibility lets you create a snapshot at critical moments without disrupting your workflow.

What are the limitations of saving Codex session state with a shell script?

The capture mechanism relies on a local shell script, meaning it requires a compatible local Codex setup. It does not automatically save state; you must manually trigger snapshots before context drift occurs.