The Practical Guide to Keep Codex Fast (No Fluff)
If you’ve been using Codex for a few months, you know the feeling. At first, it’s lightning-fast, snapping to your context like a second brain. But after weeks of deep-dive sessions, multiple worktrees, and a dozen open terminals, the latency starts to creep in. You aren't imagining it; your local state is bloated. Most people try to fix this by nuking their chat history, only to realize they’ve lost critical context for a project they’re still actively building.
You need a better way to keep Codex fast without sacrificing your hard-won progress.
The secret isn't just deleting files; it’s about managing your state with a "handoff-first" mentality. Instead of treating your chat history as a permanent archive, treat it as a temporary execution buffer. When a thread gets too heavy, you don't just archive it—you extract the intelligence.
Why Your Codex Feels Sluggish
The performance drag usually comes from a combination of massive SQLite logs, stale project references, and a cluttered workspace that forces the model to parse irrelevant history. If you’re running multiple dev servers or have long-running terminal sessions, the overhead adds up.
The keep-codex-fast skill is the most reliable way to handle this because it prioritizes safety over automation. It doesn't touch your files until you explicitly tell it to. It acts as a diagnostic layer, showing you exactly what’s eating your resources before you make a move.
The Handoff Workflow
Before you archive anything, you must create a continuity note. This is the part most developers skip, and it’s why they end up frustrated when they try to resume a project three weeks later. A proper handoff document should be stored in your repo—usually under docs/codex-handoffs/—and include:
- Current Goal: A one-sentence summary of what you were solving.
- Completed Work: A bulleted list of what actually works.
- Technical Debt: Known errors, failing tests, or "do-not-touch" areas.
- Reactivation Prompt: A specific block of text you can paste into a fresh chat to instantly re-prime the model with your project's current state.
Here’s where most people get tripped up: they try to automate the cleanup entirely. Don't do that. An automated script doesn't know which chats are "active" and which are "junk." Use the skill to generate a report, review the candidates for archiving, and then perform the cleanup manually. This keeps you in control of your own context.
Maintaining Speed Without Risk
Once your handoffs are safely committed to your repo, you can safely run the maintenance commands. The goal is to move stale worktrees and rotate large logs without losing the ability to recover if something goes wrong.
If you’re worried about losing data, use the --backup-only flag first. This creates a snapshot of your local Codex metadata, allowing you to verify that the cleanup won't impact your current workflow. If you’re ready to commit, the --apply command will handle the heavy lifting, but always ensure your Codex instance is closed before you trigger the mutation.
This isn't just about clearing disk space; it’s about maintaining a clean mental model of your project. By archiving old sessions and starting fresh threads, you ensure the model isn't hallucinating based on outdated code patterns or resolved bugs.
Try this today and share what you find in the comments—you’ll likely be surprised by how much "ghost" data has been slowing down your development cycle. If you want to see how this fits into a larger workflow, read our guide on managing AI context windows next. Keeping your local environment lean is the only way to maintain high-velocity output.