← All projects

CodePass

TypeScript · CLI · Node

GitHub Reponpm Package


CodePass detects Claude Code hitting its rate limit and hands off to Codex mid-task

The problem

If you live in AI coding tools, you hit this constantly: you’re deep in a task in Claude Code and slam into a 5-hour rate limit, or you realize halfway through that Codex would handle the next part better. Either way, switching tools means starting over - the new agent has no idea what you were doing, what you’d already changed, or what was left. The context evaporates exactly when you can least afford to rebuild it.

What I built

CodePass is a terminal harness that runs your coding agent inside one session and watches it. When it sees a rate limit or failure, it writes a shared handoff file and launches the next tool in your chain - Claude Code → Codex → opencode → Cline → Ollama - so you pick up where you left off. The whole interface is one command:

codepass

A chain of tools connected in sequence, representing CodePass’s provider chain

The hard design decision

The honest constraint shaped the whole project: you can’t copy a tool’s private live chat state into another tool - no coding agent exposes a reliable API for it. I could have faked a “conversation transfer” and shipped something that felt magic but broke silently. Instead CodePass preserves practical continuity through an artifact both tools can actually read: .codepass/current/handoff.md, capturing the goal, the working directory, git status and diff, changed files, project instructions like AGENTS.md, transcript excerpts, and the reason for the switch. The active tool is instructed to keep that file current as it works - so there are no extra AI calls, and the handoff costs nothing beyond what you were already spending.

A single handoff file radiating context to a folder, a git diff, and a terminal cursor

Because those files capture terminal output and diffs, they can contain secrets, so CodePass writes its own .gitignore and best-effort redacts common credential formats before persisting anything.

Outcome

Switching agents went from “start over” to a labeled commercial break and a two-second resume. It’s open source (MIT), published to npm, and the tool I now reach for whenever I’m about to lose a session to a rate limit.