Live data from Hacker News

Maximizing the value of your Claude Code sessions

claude.com

71–80 of 206 posts

Re: Maximizing the value of your Claude Code sessions

#71
post #59

Earlier quoted context omitted.

Not sure how this level of cynicism is even remotely warranted. The post helps people who don't understand LLMs very well get the most out of Claude. Your incentives here are actually aligned with Anthropics since both of you want fewer tokens inputted and outputted per task completed.

Perhaps my enterprise cynicism is not warranted, but my other comments refer to accurate descriptions of reality: Anthropic wants to place their opaque system between you and any computational task that you wish to perform. Do you contest this or think it is not accurate? Why do you think that Anthropic wants fewer tokens inputted and outputted?

Because they sell subscriptions and tokens cost them compute, and their margin lives in the difference between what your subscription pays in and what you cost them in compute.

They have also been supply constrained on compute and if users cost them less in compute they can more subscriptions and less customer frustration.

I agree they want you to have a subscription. That doesn't mean they aren't aligned with their subscribers.

Re: Maximizing the value of your Claude Code sessions

#72

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 limit…

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.

Re: Maximizing the value of your Claude Code sessions

#73
post #62

Earlier quoted context omitted.

I'm doing my best to interpret your comment but if I parse it it seems like you think my complaint is "I shouldn't have to express myself clearly" when really its "Why am I being asked to understand and manually manage the implementation details of the product in order to keep it working efficiently?". Unless I am fully not understanding your comment and you don't actually mean “humans require communication skills to…

> 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.” It's true both that it can be smarter than all us meat bags and that talking to it a certain way gets better results. O…

Huh. And to me it’s like “I can’t believe Anthropic has the audacity to post that and I can’t believe my peers defend it”

Oh well.

Re: Maximizing the value of your Claude Code sessions

#74
post #24

Earlier quoted context omitted.

Author not bro, sorry misgender

I'd argue that women can be bros too, especially when using the word in this sense.

puts on my etiquette hat

don’t do that, it is weird, use “bruh” or “dude”

Re: Maximizing the value of your Claude Code sessions

#75
post #9

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 th…

I’m guessing that there’s a system prompt at the top telling the model about its reasoning budget. So when you switch reasoning effort it busts the cache.

Hmmm... Why wouldn't this be handled like other end of prompt things like the current mode?

Re: Maximizing the value of your Claude Code sessions

#77
post #52

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

[deleted]

Re: Maximizing the value of your Claude Code sessions

#78
post #52

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

[deleted]

Re: Maximizing the value of your Claude Code sessions

#79

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…

You may be running into a "known" bug with Claude Code: https://github.com/anthropics/claude-code/issues/63930

Re: Maximizing the value of your Claude Code sessions

#80
post #29

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

so i actually read beyond the TLDR and the reasons are:

- it gets attached early so fully cached, even if later cache is busted

- it gets included in every request automatically, so if your following requests are going to keep triggering File Read requests it will be much cheaper and faster to keep sending it

My main question is how this works if Claude itself keeps editing the file. Surely then you are sabotaging your own cache rather than helping it.

The things to add this way would be static files that you don't expect to change and to be highly relevant to the following requests. Especially if you want them to be mandatory reading and not just hope the agent will read it.

Post reply on HN