A creator distills Anthropic's own guidance on running efficient Claude Code sessions into six habits across three buckets.
Posted
3 days ago
Duration
Format
Tutorial
educational
Views
4.6K
115 likes
57 · 43
Big Idea
The argument in one line.
Six habits split across context management, resource selection, and noise filtering determine whether a Claude Code session burns tokens efficiently or quietly racks up avoidable cost.
Who This Is For
Read if. Skip if.
READ IF YOU ARE…
You run Claude Code sessions regularly and have never checked what /context reports before your first message.
You're on (or expect to move to) a metered API plan rather than a flat-fee subscription, where wasted tokens show up directly on your bill.
You install a lot of MCP servers, skills, or custom agents and haven't audited what's still loaded and running.
SKIP IF…
You've already built a disciplined clear-and-@-mention workflow — this is a checklist you likely already follow.
You're not using Claude Code or a similar agentic coding tool day to day.
TL;DR
The full version, fast.
Anthropic published guidance on running efficient Claude Code sessions, and this video distills it into six habits across three buckets. Context management means clearing between unrelated tasks, only running /compact within the first hour before the prompt cache expires, and auditing total context with /context, which can reveal tens of thousands of tokens loaded before a single message from forgotten MCP servers or skills. Resource efficiency means locking the model and effort level at session start, since switching either mid-session invalidates the whole cache, and @-mentioning files directly instead of letting Claude search for them. Noise reduction means filtering noisy commands and routing anything likely to produce heavy output through a cheap sub-agent.
Free for members
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Sean frames the video: Anthropic published an article on maximizing Claude Code session value, and he's pulling out the six biggest takeaways, grouped into three buckets.
00:23 – 01:51
02 · Clear between tasks
The first and most underused habit: run /clear whenever you're switching to unrelated work so stale context doesn't ride along. Spec-driven workflows help because every stage gets saved to an artifact, so clearing is always safe.
01:51 – 02:45
03 · When /compact actually helps
Compact only pays off inside the first hour of a session. Wait longer than that and the prompt cache has already expired, so /compact forces a full reread instead of a cheap summarize.
02:45 – 04:30
04 · /context and /memory audits
Running /context shows exactly what's loaded before a single message is sent, 47,000 tokens on an Opus 5 window in this example, with 11,000 of that tied to memory. The /memory command breaks down whether that's user-level or project-level bloat.
04:30 – 04:59
05 · MCP servers and skills quietly bloat context
Installed MCP servers, custom agents, and viral skills (he name-checks Graphify) often get forgotten and keep adding tokens to every session's startup cost, sometimes pushing pre-message load past 100,000 tokens.
04:59 – 05:45
06 · Context management recap: audit weekly
The three context-management habits, clear, time your compacts, and audit with /context, combine into one weekly ritual: check your context total and prune anything unrelated.
05:45 – 06:50
07 · Lock model and effort level at session start
The model and effort-level pickers look like harmless settings, but switching either mid-session invalidates the entire prompt cache, every prior message has to be reread and repaid for on the next turn. Swap models by spawning a sub-agent instead.
06:50 – 08:28
08 · @-mention files instead of letting Claude search
Directly @-mentioning a file attaches it to the request outright, cutting the read calls and search operations Claude would otherwise burn tokens on hunting for it across directories.
08:28 – 09:28
09 · Quiet flags for noisy commands
Letting Claude run an unfiltered git status (or similar) on a messy repo dumps everything into the context window and the cache, muddying both and costing tokens for output that was never useful.
09:28 – 10:35
10 · Isolate noisy output in sub-agents
His actual habit: kick off a Sonnet or Haiku sub-agent to run the noisy command, isolate just the useful result (clean branch, last five commits, nothing staged), and hand only that back to the main orchestrator window.
10:35 – 12:20
11 · Why this matters beyond subsidized flat-rate plans
Subscription plans hide per-token cost, but that discipline becomes mandatory the moment you're paying metered API rates or building on open-source models, habits worth building now before the flat-fee subsidy goes away. He closes by linking Anthropic's original article.
Atomic Insights
Lines worth screenshotting.
Clearing context between unrelated tasks removes stale information instead of letting it silently persist into every future turn.
Running /compact after your session's first hour has passed forces a full reread because the prompt cache has already expired.
A single Claude Code session can load 47,000 tokens of context before a single message is even sent.
Installed MCP servers and skills add fixed token overhead to every session's startup, whether or not you use them that session.
Switching the model or effort level mid-session invalidates the entire prompt cache, forcing Claude to reread everything sent so far.
@-mentioning a file directly attaches it to the request, which costs fewer tokens than letting Claude search for it by name.
Running an unfiltered git status on a messy repo dumps every line into the context window and the cache, whether or not any of it is useful.
Routing noisy commands through a cheap sub-agent lets you keep only the distilled result in your main session's context.
Flat-fee subscription plans currently hide the real per-token cost of sloppy context habits.
Takeaway
Six habits decide your Claude Code cost
TOKEN DISCIPLINE
The gap between a Claude Code session that burns tokens fast and one that doesn't comes down to three buckets: managing context, picking resources deliberately, and filtering noise before it hits the model.
02Clear between tasks
Running /clear whenever you switch to unrelated work strips out context you don't need, instead of letting it silently ride along in every future turn.
Spec-driven workflows make clearing safe by default: each stage's decisions get saved to an artifact, so nothing is lost when the conversation is wiped.
03When /compact actually helps
/compact only pays off inside the first hour of a session; once that window closes the prompt cache has already expired, so compacting forces a full reread instead of a cheap summarize.
If you rely on /compact, run it before the hour mark rather than after, the savings come from beating the cache expiry, not from the summarization itself.
04/context and /memory audits
Run /context before assuming your session is efficient. One example here showed 47,000 tokens loaded before a single message was sent.
When memory tokens run high, /memory shows whether the bloat is user-level, project-level, or something else worth pruning.
05MCP servers and skills quietly bloat context
Every installed MCP server, custom agent, and skill adds fixed token overhead to every session's startup, whether or not that session uses it.
Viral tools people install and forget are a common source of this bloat, and it can silently push pre-message context past 100,000 tokens.
06Context management recap: audit weekly
Treat a context audit like a maintenance task: check your total token load about once a week and prune anything unrelated to the current project.
07Lock model and effort level at session start
Switching the model or effort level mid-session invalidates the entire prompt cache, forcing a full reread of everything sent so far on the next turn.
If you need a different model to handle part of a task, spawn a sub-agent instead of switching the main session's model.
08@-mention files instead of letting Claude search
Explicitly @-mentioning a file attaches it directly to the request, which is cheaper than telling Claude to go find a file by name.
Letting Claude search for a file instead of mentioning it costs extra read calls and search operations, each of which burns tokens.
09Quiet flags for noisy commands
An unfiltered command like git status on a messy repo dumps everything into context, and that noise then sits in the cache for every later turn.
10Isolate noisy output in sub-agents
Route commands you expect to be noisy through a cheap sub-agent, Sonnet or Haiku, so only the distilled result reaches your main session.
11Why this matters beyond subsidized flat-rate plans
Subscription flat fees currently hide the real per-token cost of sloppy habits, but that subsidy won't last as more work shifts to metered API pricing and open-source models.
Glossary
Terms worth knowing.
Prompt cache
A stored copy of tokens Claude has already processed in a session, so the model doesn't have to reprocess, and repay for, the same context on every new message.
/compact
A Claude Code slash command that summarizes the current conversation into a shorter version to save context space.
/clear
A Claude Code slash command that wipes the current session's context entirely, starting the next message with a blank slate.
MCP server
A Model Context Protocol server, a plug-in that gives Claude Code extra tools or data sources, which also adds token overhead to every session it's installed in.
Effort level
A Claude Code setting that controls how much reasoning the model does per turn, separate from which model is selected.
Sub-agent
A separate Claude Code session spawned to handle a specific task, whose context and cache are isolated from the main session.
“When you change this, if you change it mid session, it is going to completely invalidate the cash that you have.”
the model/effort-level cache-busting gotcha→ TikTok hook↗ Tweet quote
17:15
“We don't really care how many tokens it takes to get something done, and that doesn't actually work when you are using open source models.”
the stakes argument for why this matters beyond flat-fee plans→ newsletter pull-quote↗ Tweet quote
The Script
Word for word.
Read-along
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
17px
metaphor
So Anthropic just put out an article on how to maximize the effectiveness of your Cloud Code sessions. The article itself is fairly long, and so I took out what the six biggest takeaways are from this, and that is what we're gonna go through really quickly in this video.
So the first thing up that not enough people, I think, really do heavily is using clear between tasks. So what we're talking about here is the slash command inside of your terminal for clearing something.
A reason this is valuable is that it is going to basically scrub out any of the context that you don't actually need. So if you're ever swapping between something where you don't need all of the context of what was just done.
You should be clearing out your context entirely. This is one of the reasons in, like, a coding context at least that I like using spec driven tools, because it saves every stage to an artifact that has all of the context it needs, and then we can clear all of the time.
So it always bewilders me when people complain about how they're running out of tokens all the time on, like, Claude Max plans. That never happens to me, and I think it's because I use something like clear a ton. So the next one up is when should you actually use the compact command?
I think a lot of people will use it in situations where it's actually going to end up costing you more in terms of tokens in the long run. And so specifically, what we're talking about here is that if your session has had more than an hour pass by, so if an hour has gone by since the last time you messaged inside of that session, and you run the compact command, you've basically lost the entire cache.
So if you're not aware of how language models work, they are caching all of the messages that you send. And that cache is important because then instead of you having to basically send all of the context again and again and again and again, they've actually stored a lot of that context already so that Claude has it and it knows about it, but it doesn't have to reprocess the same information all the time.
So if you were to go through and run the compact command after an hour has passed by, you are basically forcing it to reread everything that was there in order to run that comp compact command.
And so if you are somebody that actually uses this, which I don't use it that much, I use the clear command. If you do use compact, you should be running this a little bit more regularly.
So again, think if an hour has passed by, I wanna make sure I'm getting this compact command in before that happens. And again, this is just something that is going to help you maintain your costs over time. So you're not gonna get some crazy performance out of it necessarily, but you are going to have a lot better time when it comes to managing token costs.
So the next thing up is this slash context command. If you haven't used this before, if we were to go down into one of our projects and we run this context command, it's going to help you actually visualize everything that gets loaded up before messages even sent to, in this case, Anthropic.
And so we can see, for example, on an opus five context window here, 47,000 tokens are being loaded up before I have even sent anything. And that's kind of crazy if you think about it, because if you were around for vibe coding or agentic coding or agentic workflows back in the day when we had really small context windows, you were trying to write entire code blocks that were less tokens than this.
And now this is just, like, the default that is being loaded up before we even sent anything. And so this is one of those things that if you have never run this command for yourself, I highly recommend that you go in and run it so that you can see what is getting loaded up before anything even happens. So for example, in this case, we could see we have 11,000 tokens specifically related to memory.
And so if we were to come through here then and run this memory command, we can move through, and we can actually see what is the memory then that's being saved.
Is it user memory? Is it project specific memory? Or is there something else going on that is causing this to be so high?
Because realistically, that's a lot of tokens for things that could potentially not be related to this project. So if this is something that is really high for you, you should go start pruning all of this stuff out. They have a doctor command that can help you with some of this stuff, but what often happens, especially if you're into the whole AI tool trend, everything's a game changer all the time.
If you're going in and actually downloading those tools regularly, you may be forgetting what MCP servers you have installed. A lot of those skills like Graphify and all those types of things that have gone super viral lately, They often ship with MCP servers and custom agents and custom skills.
Sometimes they're installed globally, and so that can just bloat and bloat and bloat over time. And then before you know it, your sessions are loading up a 100,000 tokens before you've even started, and that's a problem for a lot of different reasons.
So these first three would fall into the category of context management. So, again, making sure we're clearing in between tasks, that's a really big one and an easy one to do. Making sure that if you do use compact, that you're doing it within that first hour window, and that you're regularly running through.
I would say, like, once a week, this is something you could set a reminder for yourself to go through and check what your current context is. So for example, that one I just ran, I had cleaned this out maybe two or three weeks ago, and I was down to about 20,000 tokens, and I'm already back up to 40,000.
So that means I need to go through, and I need to clean stuff out because that is just bloat that is gonna end up in every single session that I move through. So moving into the second bucket here, we now have resource efficiency. So when you are inside of ClaudeCode, you have this option to set the model and the effort level.
Now a lot of you probably know this. The model picker is a very obvious one. The effort level is maybe one that beginners haven't messed around with that much, but it is a really impactful impactful thing that you can use.
But the thing that you need to know is that when you change this, if you change it mid session, it is going to completely invalidate the cash that you have.
So if you're up to, for example, a 100,000 tokens inside of your session and you've been having a conversation, and now you change the model, you go from fable to sonnet or from opus to fable or whatever it is, or you change the the effort level or or something like that, it is going to invalidate that cash, which means on the next message, it has to now reread every single thing that cash that they had is no longer actually valid for you.
So that is going to be something that costs you more money over time. Realistically, it's gonna burn through more of your tokens. So if you do need to do something here where you wanna have a different model level handle something else, I have found that the easiest thing to do is to just spawn up a sub agent and have the sub agent get after whatever it is that you need to do.
Now the second one, which is one that I didn't actually know about it working this way, is that you should use the at symbol to mention files. Now a lot of us know that we can do that.
That's pretty obvious at this point. You can at mention a file, and then it's gonna know that it needs to use that file. But that is actually a better thing to do than telling it to go look for a file that exists.
So for example, if we were back inside of this project and I wanted to reference this smoke test markdown file, if I were to come in here and run this at command, and then scroll down to smoke tests and call that file, this actual file then is being attached to the request that gets sent.
And so the result of this is less tool calls, less things having to be done that, again, are going to be consuming tokens. So less read calls and search operations that need to take place.
And I think a lot of people, they end up defaulting to the lazy mode a lot of the time with this stuff, where we're going to just say, like, hey. Go find that file named this, and then just let it run off and try to find that in all the directories. Well, then it's having to actually search all of those directories, reading the outputs of those search commands are gonna cost tokens, and it ultimately just gets more inefficient and more inefficient over time.
So where possible, when it's reasonable for you to do, using the actual at mention is gonna be a big resource saver for you. Now the last category here is called noise reduction.
And so there's two things that fall into this category. The first one is using flags or other systems to filter through noisy commands.
So for example, if you have a project with a bunch of untracked changes inside of it, like inside of Git, for example, and you were to just let the model go and make any old CLI call that it wants to to try to check what is the status of everything that you have going on, it has to read everything that outputs. So if you were to run a git status command, for example, and you had just, like, a bunch of stuff that has no business being in there, and it needs to read it, you have now, number one, muddied your context window because it had to read all of that, and that that's now all in the cache of information that it has.
And then again, number two, it is going to cost you money because it needs to actually read and parse all of those tokens out. Now the second thing that you can do here, which is what I actually do typically, is anything that you know is going to have a bunch of noise inside of it, you run those in sub agents.
So you kick off a Sonnet sub agent, for example, or even Haiku, depending on what you need to do. To go out there, run those commands, isolate the output that it actually needs, and then pass that back to your main model. And, again, that's a very easy thing to do if we were to pop down into our terminal, and we were inside of here.
You could say something like kick off a haiku sub agent to see the current git status of our branch. Now for this type of thing, you could argue maybe that might be a little bit of overkill, but there are gonna be a lot of situations where you know that a lot of context is going to be generated, and you know that you're not gonna need all of that context, and you only need a specific piece.
That is where something like this is going to be really valuable for you. So for example, in this case, instead of this main orchestrator window having, you know, all of this stuff dumped out and logged into it, we simply know, hey. Here's what we have that are on track changes.
Here are the last five commits that were made. Nothing is staged or modified. And then we're good to go, we know where things stand.
So the reason that this is all important is that there's a real battle forming in terms of the cost that it takes to actually complete a task. We are all currently used to these heavily subsidized things like a Claude Codemax plan, for example, or codex plan or or whatever, where we have this flat fee that's heavily subsidized by the model providers, and we don't really care how many tokens it takes to get something done.
And that doesn't actually work when you are using open source models, for example, where you have to pay the cost of the subscription, doing these random things where you just allow it to go out and do whatever it wants and you're not really caring about how it goes and does that, that is a a really bad practice, and it's going to cost you a lot more money in a world where we're probably moving toward more of those types of models becoming more and more relevant for the types of work that we need to do.
So if you wanna learn more about this stuff, I'll link to this article below because there's actually a lot of really good information on here about how tokens actually come to be, how the, like, GPUs and the servers actually process these things, and why that can result in some of the things that we see, how prompt caching actually works.
And these concepts, if you wanna become someone that's actually good at building in general, you're gonna need to learn these concepts eventually because especially if you start building with your own agents, for example, and you're building with, like, an agent SDK, and they're giving you these types of controls as something that you can build in to your applications, you need to understand why they're valuable, how they work, and how they can impact things for for people.
So I will link to this in the description below, but that is it for this video. I said it would be a quick one. I will catch you in the next one.
The Hook
The bait, then the rug-pull.
Anthropic published its own guidance on running efficient Claude Code sessions. Sean Kochel pulls out the six biggest takeaways and sorts them into three buckets: what to do with your context, which resources to lock in early, and how to keep noisy command output from bloating every turn.
Frameworks
Named ideas worth stealing.
00:00model
The Three-Bucket Token Optimization Framework
Context Management: clear between tasks, time /compact correctly, audit with /context
Resource Efficiency: lock model/effort level at session start, @-mention files instead of searching
Noise Reduction: use quiet flags for noisy commands, isolate heavy output in sub-agents
Anthropic's official guidance boils down to six habits split across three buckets that together determine how many tokens, and how much cache, a Claude Code session burns.
Steal forany agentic coding workflow with per-token billing
CTA Breakdown
How they asked for the click.
VERBAL ASK
11:39link
“I'll link to this article below because there's actually a lot of really good information on here.”
Soft, single-mention CTA pointing to the original Anthropic blog post, delivered in the closing seconds rather than pitched mid-video.
Sean Kochel wires Mobbin's screen library into Claude Design through a community MCP server, then uses it to generate three UX directions, an onboarding flow copied structurally from a named competitor, and a single mocked-up UI component — all for a lactation-support app he invents on the spot.
A solo builder scopes, researches, designs, and epics-out a real fitness-tracking app, then hands the implementation to an unattended overnight Claude Code loop with a verification sub-agent watching every phase.
Sean Kochel installs an open-source Claude Code skill, answers a five-question brand interview, and watches it build — and bill him $20 for — a scrollable 3D website.
A 27-minute tool tour through five GitHub repos that make invisible AI-coding problems visible — architecture, complexity, prompting speed, code quality, and security.