codex-rewind CLI
An unofficial Codex CLI build with rewind: /rewind returns the conversation and project files to a chosen prompt, /redo undoes it.
- 59 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- An unofficial agent build with access to your account and commands, sharing the `~/.codex` directory, while snapshots keep copies of project files.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/codex-rewindDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- An unofficial agent build with access to your account and commands, sharing the `~/.codex` directory, while snapshots keep copies of project files.
This is third-party code. Review the repository files before installing.
What it does
codex-rewind ships a build of OpenAI Codex CLI with workspace rewind added. Stock Codex can return to an earlier point in a conversation, but files stay as they are and the model reasons about a conversation that is ahead of the code on disk. Here `/rewind` restores the workspace to its state at a chosen prompt, `/redo` undoes the rewind and `/status` shows whether snapshots are on and how much space they take. Git is not needed: the build creates no commits, leaves the index alone and works in folders that are not repositories. The install adds an executable named `codexr`, so the official `codex` stays next to it. Versions look like `0.156.1-rewind.0`, where the first part shows the base Codex version. Rewind is off by default and turns on with `--enable file_snapshots` or in `~/.codex/config.toml`.
Who it is for. Codex CLI users who need both the conversation and the files back at an earlier point after a failed edit.
Good fit when
- The agent deleted files and git cannot restore them: there is no repository.
- After three failed attempts you want the state before them and a different approach.
- You want to compare two approaches to one task and return from the second to the first.
- You changed your mind about a rewind and need the changes back with `/redo`.
Not a fit when
- You need the official build with OpenAI support: this is an unofficial distribution.
- Work happens in remote environments: rewind is local only.
- You need the state from before the agent knew of a file outside the working directory.
Example request
Return the project to the state before the last edit: run /rewind and pick the prompt.Limitations
The project is not affiliated with OpenAI or supported by it, and bugs go to the author repository with the npm version. The build uses the same `~/.codex` directory as the official one: official Codex knows nothing about snapshots, and the `file_snapshots` config key makes it log an unknown key warning. Conversations started in the official build have no snapshots. Rewind works only locally, and snapshots take disk space visible in `/status`.
How to disable. Run `npm uninstall -g codex-rewind`. Conversations stay untouched; snapshots are deleted together with a conversation. Remove the `file_snapshots` line from `~/.codex/config.toml` if you set it there.
FAQ
How do I install codex-rewind?
Run `npm install -g codex-rewind`. A `codexr` command appears and the official `codex` stays in place. Node 16 or newer is required.
How do I enable rewind?
For one run use `codexr --enable file_snapshots`. To keep it on, add `file_snapshots = true` under `[features]` in `~/.codex/config.toml`.
Does rewind affect git state?
No: no commits, no stashes, no index writes and nothing changes inside `.git`. Rewind also works in folders that are not repositories.
What happens if I switch it off mid-session?
Enabling affects new sessions only and disabling never stops one already tracking. A session either has snapshots for its whole life or none.
Which platforms are supported?
macOS, Linux and Windows on x64 and arm64, the same as upstream.
Discussion
No questions or reviews yet.
Related
CLI toolsA CLI for reversible instruction deployment into Codex: preview the plan, confirm, and fully roll back
Codex Settings skills
Codex CLI Skills & Profiles
A Codex CLI plugin with twelve skills: deep research, pull request review, image generation and session handoff
A layer on top of OpenAI Codex that adds project memory, planning and completion checks before a task counts as done
Statusline HUD for Codex CLI inside tmux: context fill, tokens, branch, MCP servers and subagents stay visible in the session.
A Codex wrapper that folds repeated command output before the model reads it and, by the author's tests, saves up to 20% of tokens
Codex Bridge sends questions and file analysis from Claude Code, Cursor and VS Code to the official Codex CLI via Python MCP.
README in short
The author describes the distribution as unofficial and sends readers to the official README for general Codex use. Only the additions are covered: rewind, installation, enabling, a first rewind walkthrough and caveats.