hopsesh guide · Claude Code and Codex
Hit Claude Code’s usage limit? Continue the session in Codex (and back)
Wait, buy usage, or let Codex carry on: the limit messages, Codex’s /import, and a round trip that adds the Codex work back to the original Claude Code session.
What the limit messages mean
On a subscription plan, Claude Code shows one of these when an allowance runs out:
You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
You've hit your Opus limit · resets 3:45pm
You've hit your Sonnet limit · resets 3:45pm
The session and weekly limits are shared across all models, so switching models with /model doesn’t help. The Opus and Sonnet limits apply only to that model family: after one of those, switching to a model outside the family keeps you working. Before a window runs out, Claude Code can warn you with You've used 85% of your session limit · resets 3:45pm, and /usage shows each window and when it resets.
Your options in Claude Code
- Wait. Since 2.1.234, an interactive session signed in with a claude.ai subscription can wait for the reset and continue the interrupted task by itself.
/rate-limit-optionsoffers the wait when Claude Code didn’t start it, and Continue automatically at usage limit in/configturns it on or off. - Switch models, for the Opus or Sonnet limit only. The next request re-reads the whole conversation without cache hits.
- Buy more usage with
/usage-creditson Pro, Max and Ultra, or request it from your admin on Team and Enterprise.
If none of those suits you, because the reset is hours away or the weekly limit is gone, the work can continue in the other agent you pay for.
Continue the task in Codex by hand
The usage limit doesn’t touch your files, so Codex can start where Claude stopped, given a good briefing. Claude can’t write one once the limit is reached, so write it yourself, or keep a running HANDOFF.md while you work:
- Note the goal, what is done, what is left, the decisions you made and why, and what failed.
- Commit your work, or at least check
git statusso you know what is uncommitted. - Start
codexin the same repository and tell it to read the note and continue.
Codex knows only what the note says, not the conversation that led there.
Codex’s /import
On the same computer, Codex can import the Claude Code session itself. In a local Codex CLI session, type /import, choose Claude Code and pick the chats you want; the CLI imports up to 50 chats from the last 30 days. The ChatGPT desktop app has the same under Settings › Import.
It only goes into Codex, it reads the Claude Code data on the computer it runs on, and it isn’t available while a task is running. When the limit resets, there is no importer back into Claude Code: the work you did in Codex stays in Codex.
Continue in Codex and come back with hopsesh
hopsesh is a free, open-source command-line tool, terminal UI and app for macOS and Windows that moves sessions between Claude Code and Codex, on one computer or across several. It converts the session into Codex’s own format, so it opens with codex resume as a Codex session with the conversation in it.
hopsesh plan "fix flaky tests" --in codex # what carries over; changes nothing
hopsesh pull "fix flaky tests" --in codex # write it as a Codex session here
A session is named by its title or id. Leave out the computer name and hopsesh takes the newest copy, wherever it is; studio:"fix flaky tests" takes it from another computer over SSH. In the app, choose Move › Continue with Codex… on the session.
Before anything is written, the plan shows a loss report: what carries over, what is shortened, which paths were mapped and what is left out. Claude’s thinking blocks always stay behind, because they are signed for Anthropic. Codex also gets a briefing at the end of the history: where the session came from, what to verify first (git status and the commit at the time of the move) and the open plan. --note-file adds your own note, and --go starts Codex with “Continue.”
Back to Claude Code after the reset
When the limit resets, bring the session back:
hopsesh pull <id> --in claude
Because the session started in Claude Code, hopsesh adds only the new work from Codex to the original Claude Code session. Its earlier turns, signed reasoning included, stay byte for byte, so Claude picks up its own conversation plus what Codex did. While the session is in Codex, the original refuses new prompts by default, so you don’t end up with two versions. If both changed anyway, hopsesh stops and asks; --keep-both brings the Codex work in as a separate session. It never merges.
When Codex hits its limit
Codex plans have their own usage windows; /status in Codex shows what is left. The same move works the other way: hopsesh pull "fix flaky tests" --in claude continues a Codex session in Claude Code, and hopsesh pull <id> --in codex brings the new work back into the original Codex session, its encrypted reasoning untouched. Continue a Codex session in Claude Code has the details.
What to expect after the switch
- The other model sees history, not its own tool calls. Claude Code’s
EditandReadcalls arrive as a record of what the previous agent did. - Long outputs are shortened and the oldest steps summarised when the history is long for the other model.
- Instruction files differ. Codex reads
AGENTS.md, Claude Code readsCLAUDE.md. The briefing names the instruction files only the first agent read, and--carry-rulesbrings your instructions for every project. - Nothing is sent to a model until you start the session. hopsesh itself never calls the Anthropic or OpenAI API.
hopsesh is alpha software, and an independent project, not affiliated with Anthropic or OpenAI. More: continue a Claude Code session in Codex, and hopsesh vs Remote Control.
Usage limits and switching agents
What does “You’ve hit your session limit” mean in Claude Code?
Your plan’s rolling usage allowance ran out, and Claude Code blocks requests until the reset time in the message. The session and weekly limits are shared across all models; the Opus and Sonnet limits apply only to that model family, so switching models with /model helps only with those.
Can Claude Code continue by itself after the limit resets?
Since 2.1.234, an interactive session signed in with a claude.ai subscription can wait for the reset and continue the interrupted task. /rate-limit-options offers the wait, and Continue automatically at usage limit in /config turns it on or off.
How do I continue a Claude Code session in Codex when I hit the limit?
On the same computer, Codex’s /import brings recent Claude Code chats over. hopsesh converts the session with hopsesh pull <session> --in codex, shows what carries over first, and can bring the work back to Claude Code after the reset.
Will I lose the Codex work when I go back to Claude Code?
Not with hopsesh: hopsesh pull <id> --in claude adds only the new work from Codex to the original Claude Code session, whose earlier turns stay byte for byte. Codex’s /import goes one way only, into Codex.
Does Claude’s reasoning carry over to Codex?
No. Claude Code’s thinking blocks are signed for Anthropic, so they are left out. The conversation and tool activity carry over as text, with a briefing; hopsesh’s loss report shows what was left out before anything is written.
Use the method
Try it with hopsesh
Open-source CLI and desktop app: move a Claude Code or Codex session to another computer, into the other agent, or to the cloud, with undo built in.
See everything hopsesh does →brew install roeehrl/tap/hopsesh Without Homebrew: curl -fsSL https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.sh | sh, which checks the download against the release’s checksums and signature.irm https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.ps1 | iex Same checks as the macOS and Linux script. The Windows app installs this command as well.More ways to install
- Installer for Arm64 Windows 10 or 11 on Arm
- Portable .zip x64 or Arm64, no install, on the release page
- Command line with Scoop from the roeehrl bucket, without the app
scoop bucket add roeehrl https://github.com/roeehrl/scoop-bucket; scoop install hopsesh - Command line only in PowerShell, without the app
irm https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.ps1 | iex