Claude Code Hit Its Usage Limit Mid-Task. Hand the Same Worktree to Codex in 4 Commands
Book: Prompt Engineering Pocket Guide The series: Pocket Guides for Developers — 8 short books on agents, RAG, prompts, observability, events, databases and system design — the whole series My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub Claude Code is three files into a refactor when it shows "Usage limit…
Claude Code was mid-refactor when it encountered a usage limit. According to Anthropic's help article, hitting a usage limit during a response means Claude may finish the current step it's on. The wrap-up only covers the completed response, and Anthropic mentions gradual rollout of this feature. To continue the work, you can hand the same worktree to Codex using four commands.
Everything that Claude Code can see will be transferred, including the .env file and node_modules. However, Claude Code's conversation, auto-generated notes, and project-specific rules in CLAUDE.md remain with Claude Code. To make the handoff work, prepare a handoff script (handoff.sh) that captures the current status of the branch, recent commits, changed files, and runs the tests.
After running the tests, save the output to a file. This process ensures that the next step can be continued without issues, and all changes made by Claude Code are taken into account in the new worktree.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.