One short question in a conversation you’ve had open since the morning costs more than the same question in a fresh one, because Claude Code sends the model the entire conversation so far along with it. Most of the habits that make your limit last longer follow from this one mechanism – from the format of the files you give Claude Code to read to the moment when it’s worth summarising the conversation or starting a new one.
Where tokens go
A token is the unit a model counts text in: sometimes a whole word, sometimes part of one, sometimes a few characters. Everything the model reads is counted in tokens, and so is everything it writes, including what it thinks through before it answers.
The model remembers nothing between messages. That’s why, with every message you send, Claude Code sends the model the whole conversation again: Claude Code’s system instructions, your CLAUDE.md file, every earlier question and answer, the contents of the files it has read and the output of the commands it has run. Your new question is just the last piece of that package. And when Claude Code reaches for tools in the middle of a single answer – to read a file, say, or run a command – each tool use is another request carrying the same baggage.
The model’s prompt cache takes some of that cost off. Whatever the model has already processed once, it reads at a lower rate on the next request – lower, but not zero, which is why a long conversation costs more per question than a fresh one. On a Claude subscription the conversation’s cache lasts an hour without activity, and once you’re working on usage credits – paying separately for work beyond your limit – only five minutes. So the first message after a longer break has the model process the entire conversation from scratch, with no discount at all.
In the terminal, Claude Code can summarise a long conversation you’ve stepped away from just before its cache expires. When it does that and how to turn it off, we cover in the news on summarising during a break.
What fills the context window
The context window – everything Claude Code has in front of it in the current conversation – isn’t empty even before your first message. At the start it takes in your CLAUDE.md files, notes from auto memory, the descriptions of your skills and the tool names from connected MCP servers. Then comes whatever happens in the conversation: every file read, the output of every command and every answer from Claude Code. All of it stays in the window until the conversation is summarised or ends, and it travels with every message after that.
The /context command, typed into the message box like an ordinary question, shows what’s taking up the window right now, broken down by category, with hints on what you could slim down. What sits in the window from the start you can influence by tidying up CLAUDE.md and your skills. Where you have the most say, though, is in what you give Claude Code to read during the conversation.
How to measure the window with /context before and after a change to a skill, we show in the lesson “Skill and subagent – splitting the work”.
Lighter formats and smaller files
An Excel file carries a lot more than data – colours, bold text, formulas, the layout of the sheet – and Claude Code has to wade through all of it even when you’re only asking about the numbers. At our workshops we suggest that when you work with data from a spreadsheet, you first ask Claude Code to export it to a CSV file: plain text holding just the data, with no formatting at all. From what we’ve observed, Claude Code uses fewer tokens on a file like that, has less noise to get through and works faster.
Text works the same way. It’s better to move the wording of a quote, your terms of business or a contract from Word or PDF into a Markdown file (.md) – plain text with headings and lists – or into HTML, and work on it there. CSV and Markdown are for working on the data and the content, not on how it looks. The look comes last: once the data and the text are ready, you ask Claude Code to move them from the working file into Excel, Word or PDF.
While you’re at it, it’s worth splitting a large file into smaller ones – just ask Claude Code to split, for example, a yearly sales summary into quarters, or long terms of business into chapters, one per file. That way only the part you’re actually working on goes into the conversation.
CSV comes with two catches. It has no notion of sheets, so a workbook with several sheets turns into several separate CSV files. It doesn’t keep colours or formatting either, so when Claude Code puts results back into Excel, the formatting can get lost along the way. Rather than asking for a one-off transfer of the data, then, ask Claude Code for two reusable scripts – one moves the data from the spreadsheet to CSV, the other moves the results back into the spreadsheet:
Write a script that pulls the data from the spreadsheet [put the file name here] into CSV files next to the original, one file per sheet, and a second one that puts the finished results from the CSV files into a copy of the spreadsheet, keeping the original's colours and formatting. Don't change the original. Save both scripts in the Tools folder so you can use them on other spreadsheets. Run the first script on this spreadsheet straight away.
The CSV files will appear in the same folder as the spreadsheet, and you can open them in Excel – it’s the same data, just without the colours. The scripts stay in the Tools folder, so with the next spreadsheet Claude Code simply runs them instead of writing everything from scratch. It’s also worth asking it to add a rule to CLAUDE.md: before writing a new script, check whether there’s already one in the Tools folder.
When to summarise the conversation and when to start a new one
The /compact command replaces the conversation history with a summary of it, while /clear wipes the conversation and starts from zero. When you’re changing topic and need nothing from the previous conversation, type /clear: according to the documentation it costs nothing, and the old conversation stops travelling with every message. When you’re carrying on with the same thread and the conversation has grown long, type /compact. After the command you can add what the summary should focus on:
/compact focus on what we agreed about the quote and on the files we created
The summary has a cost of its own, because to write it Claude Code sends the model the whole conversation one more time. While the cache is fresh, a summary costs a fraction of what the conversation’s size would suggest; after a longer break it comes out at its most expensive. That’s why the documentation recommends running /compact at a natural break between tasks – once you’ve wrapped up one thing and before you start the next – rather than waiting for the window to fill up and Claude Code to summarise the conversation in the middle of your work. For the same reason, before you step away for a while, it pays to summarise a long conversation while the cache is still fresh.
/compact also comes in handy before you switch models. Each model has its own cache, so after a switch the new model reads the whole conversation from scratch, with no discount. If you summarise the conversation right before switching, it reads the summary instead of the full history.
When switching models mid-conversation pays off and when you’re better off starting a new one, we cover in the Tip on choosing a model.
The five-hour window and the weekly limit
A Claude plan has two limits: a session limit, which renews every five hours, and a weekly one. Both are shared across claude.ai, Claude Code and the Claude desktop app, and both cover all models at once. There’s no daily limit.
The weekly limit renews at a fixed time tied to your account, regardless of when you start working. When the five-hour window starts counting, the documentation doesn’t say. From what we’ve observed, the window runs from the first message after the previous renewal. If the previous window ended at 3 a.m. and you send your first message at 8 a.m., your limit renews at 1 p.m.
The /usage command shows how much of both limits is left and when each one renews, and you can plan your day around that. With half an hour to go before the window renews and plenty of limit still left, give Claude Code the biggest task on your list now, because the unused part of the session limit doesn’t carry over to the next window. With little limit left and the renewal a long way off, save what’s left for small, repetitive jobs that a lighter model can handle. Bear in mind that all usage counts towards both limits at once, so a single very large task – one with many subagents working in parallel, for example – can use up your weekly limit before the five-hour window renews.
People on our courses often ask how many tokens a subscription actually gives them. Anthropic doesn’t publish that number for Pro or for Max, only multiples: Max 5x gives you five times as much usage per session as Pro, and Max 20x twenty times as much. What that comes to in practice depends on how long your conversations run, the model, the effort level and the features you use, and according to Anthropic, tools and connectors use a lot of tokens. So there’s no working out your usage in advance. You can only watch it. On the Pro and Max plans, /usage also shows what share of your usage goes to individual skills, subagents, plugins and MCP servers.
When the session limit runs out halfway through a task, Claude Code with a Claude subscription will by default wait and get back to work once it renews – we wrote about it in the news on picking up after the limit. When Pro is enough and when it’s worth moving to Max, we set out in the Tip “Pro or Max”.
A subagent on a lighter model, and the model for your conversation
A subagent reads and processes in its own context window, and only its summary comes back to your conversation. With heavy reading – a few dozen files, say, or a long export from some system – this protects the conversation’s window, and the messages that follow carry less baggage. A subagent’s requests still count towards the same limit as those in the main conversation, though, so the real saving only comes with a lighter model. A subagent with no model set works on the same model as the main conversation. If you’re talking to Opus, it’s Opus that will be going through the files for you too.
You don’t write a subagent’s file by hand. You describe to Claude Code what the subagent should take care of, and Claude Code creates the subagent’s file in the .claude/agents folder – in the same request, just say which model the subagent should run on, Haiku or Sonnet, for example. It’s also worth putting a general rule into CLAUDE.md so that Claude Code hands this kind of task to subagents without being reminded:
Add a rule to my global CLAUDE.md: tasks that can be split off, such as going through many files, searching or putting together summaries, go to subagents running on a lighter model than the one we use in the conversation. If there's no subagent for a task like that yet, offer to create one.
For the main conversation we recommend starting with Sonnet, because it uses less of your limit than Opus, and keeping Opus for the hard part of the work. With the people on our courses, though, we see that a smaller model is sometimes cheaper only on paper. On a harder task Sonnet needs several rounds of corrections, and every correction is another message carrying the whole conversation so far. Opus can do in a single prompt what would keep Sonnet busy for an hour. Sonnet does best on small, repetitive jobs, including as the model for subagents that Opus hands such jobs to.
How to ask Claude Code for a subagent with a specific model, we show in the lesson “Skill and subagent – splitting the work”. When to reach for which model, we cover in the Tip on choosing a model.
In short
You save on what you let into the conversation and on how long you keep it there. A new topic means a new conversation, and a long thread gets summarised with /compact at the break between tasks and before you switch models. Give Claude Code data as CSV rather than a formatted spreadsheet, and a chapter rather than the whole document, and hand heavy reading to a subagent on a lighter model. /usage tells you how much limit is left and when it comes back, and when there’s plenty of your session limit left and its renewal is close, that’s a good moment for the biggest task of the day.