Keep Codex Fast: How to keep your local workspace clean and fast in Codex
Main chat
A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.
XX
Modern AI coding tools, such as Codex (desktop application and CLI from OpenAI), significantly accelerate development. However, when used intensively – long chats, multiple repositories, open terminals, dev servers and working on multiple projects simultaneously – the local state of the application accumulates “heaviness.” This is manifested in a slowdown in the interface, the growth of chat databases, the accumulation of worktree, logs and outdated links in the configuration.
The keep-codex-fast repository (author: vibeforge1111) offers a dedicated skill for Codex that addresses this problem in a safe, "backup-first" way. The main idea is not to delete, but to archive, pre-creating handoff-documents (context transfer documents) so that nothing important is lost.
This skill turns cleaning into a boring weekly routine rather than a stressful emergency repair.
The problem that skill solves
With a long career at Codex:
- **Chats are growing into hundreds of thousands of tokens.
- *Worktree (working trees) multiply.
- ** Logs (
logs_2.sqlite*) take up gigabytes. - Dead recordings appear in
config.toml. - Windows has long path problems (
\\?\C:\...). - The app gets slower, less responsive, sometimes “fragile.”.
The skill diagnoses these bottlenecks, suggests a plan of action, and performs cleaning only after explicit confirmation of the user. By default, it works in report-only mode (report only).
Basic principle: “Make handoffs first. Archive, don't delete
This is a key skill rule. Before any archiving of old chats, a handoff document is created - a compact file with continuity.
That includes a good handoff:
- The path to the repository and the branch.
- Current project objective.
- What's already done.
- Key files that were touched.
- Completed commands and tests.
- Famous errors and warnings.
- Open solutions and open questions.
- Restrictions, user preferences, do-not-touch zone.
- The next 3-7 concrete steps.
- Reactivation prompt - ready-made prompt to run a fresh chat.
This approach divides the roles of:
- ** Chats** - for execution (execution).
- **Handoff documents are for memory.
- Archives for history.
- Fresh threads for speed.
How keep-codex-fast works
1. Installation
Install the keep-codex-fast skill from https://github.com/vibeforge1111/keep-codex-fast
Include the repository in the skills codex directory.
2. Quick start
Just ask Codex:
Use $keep-codex-fast to inspect my Codex local state and recommend a safe cleanup plan.
3. Recommended workflow
- Start a report-only report.
- Create handoff documents for active repositories that you plan to continue.
- Review the report and decide what to archive.
- Close Codex before applying changes.
- Perform a safe cleaning:
text
Use $keep-codex-fast to apply safe cleanup. - Check the result with a repeat report.
- Set up a weekly/biweekly report-only reminder.
What exactly cleanses the skill
- Old non-pinned sessions move to
~/.codex/archived_sessions/. - Outdated worktree → in
~/.codex/archived_worktrees/. - Large log files (
logs_2.sqlite*) → rotation to the archive. - Dead/Temporary Project Recordings in
config.toml. - Problems with advanced paths on Windows in SQLite.
**Important: Nothing is removed forever. Backups (in ~/Documents/Codex/codex-backups/), manifests and recovery scripts are created.
Safety and best practices
The skill follows strict safety rules:
- Always backup before change.
- Archiving instead of deleting.
- Not touching the auth files.
- Does not kill Node/dev servers (reports only).
- Mutating operations only after Codex is closed.
- Automation ** report-only** (you cannot reliably check for handoffs in auto mode).
Recommended frequency: weekly for heavy use, ** once every two weeks** for moderate use.
Advantages and nuances
** Plus:**
- Significant acceleration of the application.
- Preserving all the important context.
- Create a useful habit of documentation.
- Reducing the risk of data loss.
- It works on both desktop and CLI.
** Possible nuances and edge cases:**
- For critical long-lived projects, handoffs need to be done manually or with skill.
- On very large workspaces, the first report and cleaning can take time.
- Windows users will benefit from the normalization of paths.
- Automation of mutation cleaning not recommended - better left under human control.
Conclusion: Why it matters in the age of AI coding
As the power of the models increases, the local state becomes the main bottleneck. Keep-codex-fast teaches you not just to “clean,” but to “manage context consciously.” The transition from giant chats to fresh threads + durable handoff documents makes working with AI more scalable, predictable and enjoyable.
This skill is a great example of a “meta tool”: it helps the tool itself (Codex) remain effective in the long run.
Reference to repository: https://github.com/vibeforge1111/keep-codex-fast