What do I do when my coding agent hits its usage limit in the middle of a task?
Save where you are first, then either wait for the reset or carry the task to
another coding agent. The files the agent already changed stay in the project folder; what stops is
the chat. Check git status, write a short note in the repo with the goal, what is
done, what is half done and the next step, and then decide whether the reset is close enough to
wait for.
BuildGist is a Mac app for Claude Code, Cursor and Codex. Download for Mac.
Right away
- Keep the uncommitted changes. Run
git statusandgit diff --statand note which files look half done. Don't rungit checkout .orgit reset --hard: they throw away the finished part along with the unfinished part. - Read the message. It says which limit you hit and when it resets. Each agent words it differently. The full messages and each agent's options are in you've hit your session limit in Claude Code, you've hit your usage limit in Codex and Cursor usage limit reached.
- Write the note. A file such as
HANDOFF.mdat the project root, with five short lines. - Run the tests. A run that stopped midway may not have reached them, and a failing test shows where it stopped more reliably than the last message in the chat.
Goal: Google sign-in on the notes app.
Done: sign-in button and callback route (see the diff).
Half done: the delete check in notes.py; it does not check the owner yet.
Next: add the owner check, then run the tests.
Stopped because of a usage limit. Don't redo the sign-in work.
That last line matters. Without it, the next agent can start the task over and edit files that were already right.
Wait or switch?
Wait when the reset is close and the task is delicate, such as a migration or
a change spread across many files. One agent keeps its own reasoning, and you come back to the
same chat. In Claude Code, /usage shows your plan's limits and when they reset. In
Codex, /status shows your session and token usage, and /usage shows your
account's token activity.
Switch when you need to keep moving. Open the other agent in the same project folder, start a new chat, and begin with: “Read HANDOFF.md and the uncommitted diff. Tell me the plan and the next step before you change anything.” Asking for the plan first catches a misunderstanding before it edits files that were already right. The step-by-step versions are in switch from Claude Code to Codex and hand off a task from Claude Code to Cursor.
Pay for more usage if your plan allows it and you want to stay in the same chat. Each agent handles this differently; the per-agent guides above have the details.
Coming back after the reset
If another agent finished part of the task while you waited, tell the first agent what changed before it continues: the task, what the other agent did, and what is left. Otherwise it meets edits it did not make and has no reason for them. Updating the note works too, since the same file serves both agents.
See it coming next time
- Check before a long task.
/usagein Claude Code and/statusin Codex show where you stand. If the agent warns that a limit is near, write the note then, while the chat can still answer. - Start fresh for new work. Claude Code sends the whole conversation with every
request, so its cost guide suggests
/clearbetween unrelated tasks. In Codex,/newstarts a fresh chat in the same CLI session. - Keep the always-loaded files short.
CLAUDE.mdloads at the start of every session. Claude Code's docs suggest keeping it under 200 lines and moving workflow-specific instructions into skills, which load only when used. - Commit at each working step. A small commit is a restore point that a cut-off run cannot spoil.
Where BuildGist fits
BuildGist does not detect a usage limit; you open the other agent yourself. When you start a new chat in another coding agent in the same project, a BuildGist card at the bottom right offers the earlier agent's task, if it was active in the last 12 hours. Choose Continue and the new chat starts with that task's context in your own words, so you don't explain the task again. Choose Start fresh and nothing is handed over. Claude Code and Codex take the context on a new session. In Cursor the handoff is best effort: if the new chat does not show the task, paste the note. BuildGist also explains each meaningful run in plain English, so you can read what the run before the limit changed. How a task moves among all three agents is in how to keep context across Claude Code, Codex and Cursor.
Questions
Do I lose my work when a coding agent hits its usage limit?
No. The files the agent already changed stay in the project folder, committed or not. What stops is the chat. Keep the uncommitted changes until you have read them.
Does switching models get around the limit?
Not for Claude Code's session and weekly limits, which its docs say are shared across all models. After a limit for one model family, such as an Opus limit, switching to a model outside that family with /model keeps you working.
Can another agent finish a half-done change?
Yes. Open it in the same folder with the note and the uncommitted diff, and ask it to explain the plan before it edits anything.
Sources
- Claude Code: manage costs
(
/usage,/clearbetween tasks, CLAUDE.md under 200 lines), checked October 28, 2026. - Claude Code: errors (usage limits shared across models, model-family limits), checked October 28, 2026.
- Codex developer commands
(
/status,/usage,/new), checked October 28, 2026.
What you need
- A Mac with Apple silicon and macOS 12 or later.
- Claude Code, Cursor or Codex.
- A Git project. No commit, push, remote or GitHub repository is needed.
- A GitHub account, to sign in. BuildGist does not access your GitHub repositories.
Codex needs you to approve BuildGist once, in Codex. BuildGist shows the steps. Setup is in Getting started.
To explain a run, your computer sends BuildGist what that run needs, and BuildGist passes it to Anthropic. BuildGist does not keep this material. It does not send your whole repository, files the run did not change, or files named like secrets, such as .env files and keys. It keeps the explanation and short cited excerpts of changed code, at most 12 lines each. Secret masking is best-effort. Privacy has the full list.
Every account gets 7 days of BuildGist Pro free, with no card. The 7 days start at your first explanation or Continue handoff. Nobody is charged when the trial ends. After that, BuildGist Pro is $12 per month, plus any applicable tax shown at checkout. See pricing.
Try BuildGist Download for Mac
Apple silicon, macOS 12 or later. United States, 18 or older.
Related
- What did Claude Code change?
- Switch from Claude Code to Codex
- Understand code an agent wrote
- Hand off Claude Code to Cursor
- Review what Codex changed
- You’ve hit your session limit in Claude Code
- You’ve hit your usage limit in Codex
- Keep context across agents
- Review AI code before merging
- BuildGist or the git diff
- Claude Code session history
- Undo Claude Code changes
- BuildGist vs CLAUDE.md, AGENTS.md and HANDOFF.md
- Keep context from Claude Code to Cursor
- Resume an agent session in another tool
- BuildGist vs Conductor
- Codex context window full
- Undo Codex changes
- Cursor usage limit reached
- Review Cursor agent changes
- Codex session history location
- Your conversation is too long in Cursor
- One default coding agent, or two?
- Tools that summarize agent sessions
- Switch from Codex to Claude Code
- Move from Cursor to Claude Code
- Switch from GitHub Copilot to Claude Code
- Move from Windsurf to Cursor
- Switch from Gemini CLI to Claude Code
- Coding agent crashed mid-task
- Claude Code lost context after compacting
- What commands did the agent run?
- Turn an agent session into a PR description
- Which coding agents read AGENTS.md?
- Switch from Cursor to Codex
- Export a Claude Code conversation
- Keep the dead ends when you switch agents
- Write a handoff note for a fresh session
Questions: kayvanandre@gmail.com.