back
182 comments
Recently I came across the /handoff skill, which I've been using a lot. I find it much better than /compact.

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.

> Plus your handoff files becomes a useful piece of project memory that you can reference later.

I've been doing this since I started agentic development, and have a whole framework based on this; Simply put I define workflow s that output templated files for everytype of tasks that happens in development.

It's a powerful pattern I'd recommend everyone.

Ah I've been doing handoff manually by asking the model to do it. If Claude's handoff includes better context than its summaries, it's probably worth checking out.
Would you please link to the specific /handoff and /continue skills you're using? I do not see them as built-in skills.
I do something similar but without using a skill.

It might be even better if the harness were to automatically write a handoff note under some circumstances? If the user is away and the cache is going to expire, that would be a good time to do it.

I've been doing handoffs manually, but maybe the command is a better way. It's a great way to keep track of work, remove useless context, and more importantly, it's an enforced "what is the agent doing" line - you immediately notice if the handoff writing is missing something or confused. Commit each and every one (git is the unsung hero of AI).
I like the handoff flow so much I built it into my agent as a native tool; and going to add it as a auto compaction strategy as well.
/handoff is the skill I use when I plainly are about to run out of token budget to give to a different harness system. Using this to avoid long sessions is something I will need to try, plus maybe "caveman" mode to cull the verbosity.
You can also do this with memories.

I've been asking Claude to remember important points from our session, or future tasks. Then /clear and continue.

I have been doing this a lot even without a skill, having Fable write a planning document, then spawning an Opus subagent with instructions to strictly follow the plan and report any deviance at the end. It also helps that then the plan is always saved in an md file so any future agent can look at it and see what happened.
> @-mention files instead of naming them

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.

What I see is that I have to read a bunch of stuff and go through a bunch of hassle to save money when the root of it is that if I tell an AI to do work on a task while I'm busy with something else and come back later I've doubled my cost because the cache expires too quickly?
Can anyone explain why the prefix cache is tied to effort?

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.

This feels like the Anthropic version of "You're holding it wrong" (1)

1) https://www.wired.com/2010/06/iphone-4-holding-it-wrong/

> @-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.

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.

This is all good to know, but funny how we are suddenly back to formal languages and commands. Aren't these things intelligent enough to figure these things out for us?
What I want is a version of `/clear` that keeps the conversation but drops out things like bloated logs, error traces, etc that were only relevant in the immediate local context.

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'm finding that unexpected cache rewrites cost me huge.

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?

Here is my working flow, confirmed by more than 400 pr merged over the last 4 months. More than half of them were following my current strategy:

1. My agent writes code.

2. Then it creates tests and verifies that all of them actually work, not just pass. To do this, my agent writes the test, then it deletes the code it covers, reruns the test, confirms it goes red, and finally puts the code back.

3. I receive the ready-to-test code and environment setup.

4. I check that the business logic works as I expected it to be on a working product. Here we usually do several iterations of coding and bug fixing.

5. When the manual part is finished, the agent starts an external review using /code review skill. At that stage, it makes some additional fixes and corrections to the tests.

6. Finally, a branch is ready to be merged. We start CI/CD and wait until the run finishes successfully.

That's what I actually use because it generally works.

Note about only docs PRs: I just ask the agent to make the changes, then it runs the / code review skill, and then we merge the branch into main without CI running.

I mean, it feels hard not to laugh at this type of blog post. My cynical interpretation is that this is a type of passing the buck to engineers in enterprise settings ("Stop spending tokens. Did you read the value maximization blog post? It is your fault.")

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.

Bro: superintelligent machine line go up AI AGI software solved automate everything

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.

What’s the point of running /clear vs starting a brand new session. At least with the latter I have session history, no? Pardon my ignorance since Claude isn’t my primary driver
I didn't read the whole thing, but I got my back up at the headline and my first reaction is now even the "AI" companies are telling you that "you're holding it wrong".

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.

After having used Codex for a promotional month, and now using Claude, Claude is not as efficient with finding relevant information. I can give it the one file it should be using and then it goes off and greps parent directories for more context. It’s also incredibly slow at producing results because of this side work. In this article, it seems like they are catching up to what GitHub copilot users had already been doing since the cost restructuring in June.
I don't understand why changing effort levels busts the cache. Couldn't effort levels be a decoding-only thing where they just change the probability of the <end of thought> token? Are they literally adding a hidden system prompt that says "effort level: $level" ?

    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”.
Most of this I was aware of, but it underscores a tension between things I want to see and things I want to model to think of.

Would be nice if it was easier to separate output that needs to live in context and stuff I just want to look at.

One thing I wasn’t aware of was the negative impact of switching models

When rewinding to an earlier turn, what if that turn is more than 1hr old? Can this cause KV-cache misses compared to continuing the conversation?
Anthropic should build a harness (and model) that smartly takes care of all these points. Not requiring the user to do the manual work. All I see are excuses because they cannot handle the load and enforce strict quotas on users, all while OpenAI constantly resets their quotas.

With Qwen 3.8 27B, we're one step closer to on-device LLMs that can replace subscriptions.

> Set your model and effort level before you start. Changing either one mid-conversation can bust your prompt cache, which can increase token cost.

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.

Considering that I'm mostly unable to reach the limit of my X5 subscription and we have 1M context, it is a guide to maximize Anthropic PnL pre-IPO
how many times it stays there i think doesnt give the best comparison

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.

TIL the prompt cache lasts 1 hour. I thought it was reduced to 5 minutes.
I have had some success with using Ollama cloud and just instructing Claude Code to hand off tasks to Ollama because of tokens economics.
Is it possible to have some kind of script to keep your cache warm, or auto compact or something.

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.

Part of the cynic in me just wants to ask "why not make a better harness by default?" The other cynic in me knows I'm about to see a hundred post on 'HOW TO 10X CLAUDE" from the ai bros and I'm already tired.

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.

high leverage for most agents:

  - review system prompt + cut it down or remove completely
  - review agents.md file(s), check which ones are loaded, remove or improve them
  - review context spam from tools, skills etc, de-activate all, see what needs re-adding
  - review past sessions to see where tokens get wasted
more advanced:

  - keep sessions short (be conscious about compaction)
  - form a habit of starting new sessions
  - deliberately practice how to effectively get the right context into a new session (vs hanging on to a 'good' session)
  - you can ask the agent to write the essential context into a .md file and have the new session read that
  - learn about forking sessions
  - experiment with starting sessions from a custom-built history/context
a good agents.md file can be small and still effective re helping the agent navigate the code base

that said: you will surprised by how well current models can navigate (way better than last year!)

How about Anthropic just be more generous with their usage limits instead?
do people use the Caveman, RTK plugins
No RSS feed for their blog.
I do all that, but an 'AS-BUILT' full review of my project still eats 3x my 5 hour budget on max 100€. Meanwhile, my 20€ GPT never hit a limit. Different, but just saying.
thinking output would be a good start
Austerity on tap!
bookmarked this
"TL;DR ..."

If only they had some kind of technology that could make a judgement and automate those actions...

meah Claude is peak trash. Really fucking upset that they ban you for using a superior harness