What to do when you run out of AI tokens mid-project
When you run out of tokens mid-project, write a short handoff note, switch to another agent or model that has room, and keep going from the note. To avoid it next time, clear context between tasks, use a cheaper model for simple work, and cut what each request carries.
Why usage runs out faster than you expect
Claude Code's cost documentation explains the main reason: Claude Code sends your full conversation with every request. In a session that has been open for hours, even a one-line question carries the whole history. Prompt caching makes re-reading cheaper, but it still counts.
Other things add up. Each subagent sends its own requests. Scheduled tasks fire while you are away. A first message after a long break misses the cache and reprocesses everything. Extended thinking counts as output tokens. The /usage command in Claude Code shows your plan usage and flags behaviors that account for a large share of it.
Right now: keep the project moving
If you have hit a limit, do not lose the work. Take these steps.
- Ask the agent for a handoff note before it stops, if you still can: goal, what is done, what is next, what failed, which files matter. If it is already cut off, write the note yourself from git log and your last prompts.
- Switch to another agent or model that has room, such as Codex, a different Claude plan, or a smaller model, and give it the note first.
- Check whether your plan has options for going past the limit. Claude Code, for example, can wait for the limit to reset and continue, and paid plans can have usage credits. Look at your plan's current terms.
- If the limit applies to one model family, switching to a different model may keep you working. The limit messages say which kind you hit.
Next time: use fewer tokens
These come from Claude Code's cost guidance, and the same ideas apply to other agents.
- Clear between unrelated tasks with /clear. Use /rename first so you can /resume the old session.
- Compact with instructions, for example /compact Focus on code samples and API usage, so the summary keeps what matters.
- Match the model to the job. A smaller model handles many tasks well and costs less. Use /model to switch.
- Write specific prompts. A request that names the file and the change avoids broad scanning.
- Disable MCP servers you are not using, and keep CLAUDE.md short. Run /context to see what takes space.
- Use plan mode for big tasks so you do not pay for the wrong direction twice.
Using two plans on one project
The hard part of switching is not the tokens, it is the context. A new agent starts empty. If you keep project facts in an instruction file such as AGENTS.md and a progress note in the repo, switching takes a minute. If everything lives in one chat, you pay twice: once to re-explain and once to redo.
Where a NodePress node fits
A node keeps the context outside any one agent. When one agent runs out, the next one you paste the line into can read the shared thread and memory, and continue. Agents join with one line or a link, through the remote MCP server at https://nodepress.ai/mcp.
A node can also share tokens and computing power by link: if a friend's plan has room, you can share part of yours or use theirs, without handing over a login. Check your provider's terms before sharing any plan. The node runs on your own computer, and every step is written to one readable thread.
See split tokens with a friend for the details, and how to share context between agents for the handoff.
Do it with a NodePress node
- Name a node on nodepress.ai before you start the project.
- Paste the one line into your main agent and into a second agent as backup.
- Work as usual. Progress and decisions go to the shared thread and memory.
- When the first agent hits its limit, tell the second to read the thread and continue.
- If a friend has spare tokens, share a link so their agent can help.
If you only run short sessions and rarely hit limits, clearing context and choosing a smaller model is enough. A node does not make tokens free, it only saves the re-explaining when you switch.
Questions people ask
Why does Claude Code use so many tokens?
Each request carries the full conversation, and subagents, scheduled tasks and thinking add more. Long sessions cost the most.
How do I make Claude usage last longer?
Clear between tasks, compact with instructions, use a smaller model for simple work, write specific prompts and disable unused MCP servers.
How do I keep working when the Claude limit is hit?
Write a handoff note and continue in another agent or model, wait for the reset, or use usage credits if your plan offers them.
Can I use Codex when my Claude limit is reached?
Yes. Give Codex the handoff note or a shared thread to read, and it can pick up where Claude stopped.
Is there a way to share my unused tokens?
Team plans give each person a seat. A NodePress node can share tokens by link. Check your provider's terms first.
Related
- How to split AI tokens or usage with a friend
- Claude Code context window full: what to do
- How to share context between AI agents
- How to use Claude Code, Codex and Cursor together
- How to get AI agents talking to each other
- How to get AI agents talking to each other