Live data from Hacker News

Maximizing the value of your Claude Code sessions

claude.com

91–100 of 206 posts

Re: Maximizing the value of your Claude Code sessions

#91
post #73

Earlier quoted context omitted.

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

And I in turn can't believe your response to the post. Different strokes for different folks. I understand that HN fucking hates everything and everyone, especially big model providers at the moment, but this shit doesn't make any sense to me and you people are starting to actually make me crazy.

Re: Maximizing the value of your Claude Code sessions

#92

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

What do you want? Lacking omniscience, even the smartest superintelligence imaginable has to do more thinking to deal with worse inputs.

Still waiting to hear what you want.

Re: Maximizing the value of your Claude Code sessions

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

Re: Maximizing the value of your Claude Code sessions

#94
post #32
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…

> 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. I suspect you're right and that's why they haven't fixed @-search in the desktop app. I actually don't find myself using it anymore since moving to the desktop app. I went from using various AI extensions in the IDE to Cl…

[deleted]

Re: Maximizing the value of your Claude Code sessions

#96
post #88
post #72

Earlier quoted context omitted.

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.

Interestingly, this was tackled in this blog post[0] a month ago. They claim that plan files aren't token-efficient, because after reading the plan the workhorse model then reads all the relevant files anyways. [0] https://news.ycombinator.com/item?id=48916512

That link just says the planning stage should vet the idea concretely so that the plan focuses on a solution that won’t immediately have to pivot.

And I think plan files should focus on general ideas and invariants, not do “implementation as prose”. That way they perform as mini-ADRs that are useful historically, especially to mine why the system is the way it is.

Re: Maximizing the value of your Claude Code sessions

#97
post #88
post #72

Earlier quoted context omitted.

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.

Interestingly, this was tackled in this blog post[0] a month ago. They claim that plan files aren't token-efficient, because after reading the plan the workhorse model then reads all the relevant files anyways. [0] https://news.ycombinator.com/item?id=48916512

The trick is to delete all the relevant files after the plan is written.

Re: Maximizing the value of your Claude Code sessions

#98
post #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

This happens all the time and drives me bananas.

It seems to be regular file edits rather than parallel tool calls.

I'm sitting on 1.6m cache write even now with 468k in /context. It drives my session costs above $100 regularly.

Can someone from Anthropic look into this?

Re: Maximizing the value of your Claude Code sessions

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

That makes sense to me. The output styles work the same way.
Post reply on HN