Maximizing the value of your Claude Code sessions
204 points - yesterday at 4:15 PM
SourceComments
Basically:
- /handoff file creates a short document with the important context from your current session and maybe next steps as checklist.
- You can then start a fresh session with /continue file
- You can also hand the work from Claude to ChatGPT, or the other way around. Very useful at time of session limits.
- Plus your handoff files becomes a useful piece of project memory that you can reference later.
I find this much more useful than /compact or /clear because the context is saved in something portable instead of being tied to one session and i've seen better results doing this every 20 messages or so than running long sessions.
Love Claude, but the @ mention is broken in the desktop app. For the same project if I type the same query "@ephem" I get:
CLI: https://imgur.com/a/VZMUCOa (good, relevant results)
Desktop: https://imgur.com/a/QLSo4Ms (bad, irrelevant)
Opened issue for this and it was automatically closed:
https://github.com/anthropics/claude-code/issues/71421
I could have written the issue better (using CLI as comparison instead of VS Code). But, no doubt in my mind Claude could fix this itself in a minute.
I frequently run Fable at xhigh effort to run statistical modeling way above my undergraduate understanding. Claude Fable produces Masters-degree level output, and then I spend lots of round trips asking it to explain different parts to me.
The first part absolutely uses the extra effort, but the interrogation exercise is something a much simpler model, or the same model with much less effort, could answer.
I've heard it argued that this is an antipattern. If the file is large, it will read the whole file. With Read or something similar, it can do a targeted search and read only the relevant portion.
Is this still not the case?
Also, since they mention /context: Can anyone explain why /context takes so long to run? It usually takes several seconds, and I've had cases of it taking over a minute.
And why don't they just show the basics in a status line somewhere? Just a plain: "120K/200K tokens" I hate having to type /context just to get this. And I shouldn't need to install an extension.
I guess compacting somewhat does that but I want something more explicitly that trims out these extremely bloated artefacts while maintaining in full the actual conversation history.
I have 1h cache TTL set, and do nothing to cause rewrite (response in time, no model/effort/tool changes).
At 400K tokens in, I'll write a message, and /usage shows only a small increase in cache write. On the next message, cache writes shows 800K, and by the end, I often hit 2M cache writes with no explanation.
This seems to happen when: using /btw, asking it to review code, other random times. Anyone know what's going on?
Until pretty recently, the tools you wrote code with were a flat fee (or free) ⦠[so] an individual task didn't really have a price of its own ⦠[but] with agentic coding tools like Claude Code, it does.
Iāve heard this anti-AI thesis before, but itās certainly novel to read it on āclaude.comā.Also bro: Run /clearbetween tasks. This prevents prior irrelevant context from being sent back to the model, which can reduce token usage. Set your model and effort level before you start. Changing either one mid-conversation can bust your prompt cache, which can increase token cost. @-mention files instead of naming them. The file gets attached to your message directly, which saves a Read call, or a search if Claude has to go find it. Add quiet flags to noisy commands, or run them in a subagent. Command output is added to the conversation just like a file, and stays there for the rest of the session. Run /context once in a fresh session. It shows what's loaded (CLAUDE.md, MCP tool definitions), so you can cut out anything unnecessary. /compact before you take a break from your keyboard. The prompt cache expires after an hour, and summarizing a conversation is much cheaper while it's still cached.
Oh yes, Claude will do all sorts of different things -- it depends on how you use it! You should totally learn all of these little finicky things ... because now completing your tasks cost money. It's not "free" anymore haha like when you used your old text editor, what are you a grandpa?
Oh, and those things will definitely change, as we (the priests of Claude) are vibe coding the system you use to do your little "tasks" ... right, you can't see how it works ... the code is not available. It's all good, just trust us -- we're totally looking out for you.
I mean it is utterly ridiculous to talk around this model of development. There are so many walls between you and doing the thing you want to do.
Agents are great, but the notion of "best tricks" for how to best use an opaque costful tool which will, by all odds, be completely different in a few months time is quite funny.
You know what won't change? A fucking text editor. Or your pi config, or a local model you run and trust.
With Qwen 3.8 27B, we're one step closer to on-device LLMs that can replace subscriptions.
if youre working on the same codebase, that cache stays quite relevant, and i dont think they make the case that clearing and reading the same couple files over and over again is cheaper that relying on it already being cached. same with doing some of the same teaching claude the right way to approach changes in that codebase again and again.
what would be nice is pulling back and reusing an earlier part of the cache for the later two tasks, but claude code doesnt make that particularly easy, and using an LLM to pick where to go back to isnt really gonna save much when it reads all the same text again.
I know we supposed to do this but is there any particular reason why such things cannot be supported? I thought its running on same model just different settings like reasoning. This would be super useful.
I sometimes just leave some goals or something running before I go to bed or out and I donāt want to pay the cache text when I come back.
I guess if I had to ask something (as someone who doesn't use CC as their daily driver), how much control do you have on subagents and roughly how do define or know when a session is getting too long? I know the answer is "when the model is getting worse" but worse is doing a lot of lifting in that sentence.
If only they had some kind of technology that could make a judgement and automate those actions...
I mean, they told us "just talk naturally to the AI because it's so much smarter than all you meatbags" and now it's āfor best results, please learn to manage context windows, prompt caching, cache invalidation, model switching, output verbosity and when to manually clear or compact your session.ā
I get it, but it seems like the "PRODUCT" should be doing this shit. I.e., the PRODUCT is getting less efficient because I didn't manually manage its context correctly and now it's MY fault.
Edit: i.e., for e.g. Doh. Even the robots get that right. Sigh.