Make your Claude Code usage limits last longer.
Claude Code resends the whole conversation every turn, so long sessions burn through your plan faster than your typing suggests. These habits stretch each window, and most cost nothing.
How Claude Code's usage limits work
On a Claude subscription, Claude Code doesn't bill you per token. It draws on two allowances: a session window that resets on a rolling five-hour basis, and a weekly window. Claude on the web, desktop and phone draws on the same allowances, and so does every Claude Code session you have open.
When you run out, Claude Code says "You've hit your session limit" or "You've hit your weekly limit" and tells you when it resets. Switching models with /model won't get you back in, because those limits cover every model.
Run /usage to see how much of each window you've used. On a plan it also breaks down what used it: skills, subagents, plugins and MCP servers, and habits such as long conversations or cache misses once they account for a tenth of your recent usage. Press d or w to switch between the last day and the last week.
Why a long session eats your limit
Every time Claude Code asks the model for its next step, it sends the whole conversation so far: your messages, the files it read, and every command output. A one-line question at the end of an all-day session still carries the whole day with it.
Most of that history comes from the prompt cache, which costs far less than reading it fresh. On a subscription the cache lasts an hour. Come back from a longer break and your next message reprocesses the entire conversation at full price.
1. Start a fresh session for each task
/clear starts over with an empty conversation and costs nothing. Use it whenever you move to unrelated work, so the next task doesn't keep paying for the last one's files. Run /rename first if you want to find the old session again with /resume.
/compact is the alternative when you want to keep going on the same task: it replaces the history with a summary. Compacting reads the whole conversation, though, so on a big session the compact is itself a big request. If you don't need the history, clear instead.
2. Use a smaller model, and less thinking, for routine work
Sonnet handles most coding tasks and uses less of your allowance than Opus. Keep Opus for hard design problems and switch with /model. Thinking counts as output, so lowering the effort level with /effort saves on simple tasks too.
A smaller model that needs three tries where a larger one needs one saves you nothing, so pick the model by how hard the task is.
3. Keep what loads at startup small
Your CLAUDE.md loads into every session. Anthropic suggests keeping it under 200 lines and moving instructions for particular jobs, like reviews or migrations, into skills, which load only when used.
Run /context to see what's taking up space, and /mcp to turn off MCP servers you aren't using. Where a command-line tool exists, such as gh, it costs less context than an MCP server that does the same job.
4. Ask precisely, and stop wrong turns early
"Improve this codebase" sends the agent reading file after file. "Add input validation to the login function in auth.ts" lets it go straight there.
For bigger changes, press Shift+Tab to switch to plan mode, so the agent proposes an approach before it writes code. If it heads the wrong way, press Escape at once, and use /rewind to go back to an earlier point instead of arguing it back on course.
5. Keep noisy output out of the conversation
Build logs and test runs can be thousands of lines, and once they're in the conversation Claude Code resends them on every turn. Run them in a subagent so only a summary comes back, or use a hook to trim the output before the model reads it. Our hooks guide shows a test run going from 2,745 bytes to 275.
6. Count your parallel sessions
Three agents running at once use your limits roughly three times as fast. Parallel sessions still pay off for independent tasks; give each one a clear, small scope and close sessions you're done with. Subagents and agent teams draw on the same allowance as well.
When you hit the limit anyway
Claude Code can wait for the reset and pick up the interrupted task on its own; /rate-limit-options shows your choices. If you have usage credits turned on, /usage-credits lets you keep working past the limit, billed separately.
If you pay per token instead
On an API key the same habits lower your bill. One difference: the prompt cache lasts five minutes by default, so a pause for a meeting means your next message pays to reprocess the whole conversation. A one-hour cache survives those pauses, but writing to it costs twice the base input price against 1.25 times for the five-minute cache, according to Anthropic's prompt caching documentation. It pays off only if your pauses are longer than five minutes and shorter than an hour.
A local model has no per-token bill. Run a local model with Ollama for routine tasks, and hand the hard ones to a cloud model.
How ket helps
- Plan usage in the header. The header shows how much of each session and weekly window you've used, and when each resets, so you see a limit coming before you hit it. Reading it costs no tokens.
- Economy sets how terse a worktree's agent is, from Off through Light, Moderate and Heavy to Max. A terser agent writes less output, and output counts against your limits. Claude Code and Codex receive the setting; other agents don't, so Economy has no effect on them.
- The command filter trims the noise from successful build and test output before Claude Code reads it, and keeps failures whole. ket counts what it cut, so you see the saving in tokens. How the filter works.
- A fresh session per task. Each task runs in its own worktree with its own agent session, so tasks don't pile into one long conversation.
- The hour-long cache on an API key. Once ket sees a Claude Code session billed per token, it starts later sessions with the one-hour cache, so a pause of up to an hour doesn't reprocess the whole conversation. If your sessions never idle past five minutes, set
prompt_cache_ttl = "off"in the[agent]section ofconfig.toml.
Related guides
Make Claude Fable usage limits last longer.
Inspect Fable requests and check the cost of resuming a session after its prompt cache expires.
Claude Code hooks, with a real example.
How to add a hook, the events that matter, and a real one that trims command output.
AGENTS.md vs CLAUDE.md: one instruction file for every agent.
Which agents read AGENTS.md or CLAUDE.md, how to keep one file for all of them, and how to keep it lean.
Run multiple Claude Code sessions in parallel.
The commands for running Claude Code sessions in parallel, each in its own worktree.
Run coding agents in parallel without sharing a working directory.
How to split work between agents, watch them, and merge the results one at a time, smallest dependency first.