Live data from Hacker News

Maximizing the value of your Claude Code sessions

claude.com

31–40 of 206 posts

Re: Maximizing the value of your Claude Code sessions

#31

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 not answer your question, I have a claude stop hook that my status line uses to tell me how close my cache is to expiring https://pastebin.com/JLXUG16Q

_entirely_ vibecoded don't @ me.

Re: Maximizing the value of your Claude Code sessions

#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 Claude Code desktop.

But if that's accurate, why mention it in this post? Maybe because that's the first thing developers will try when moving away from a code editor?

Re: Maximizing the value of your Claude Code sessions

#34
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…

You can make your own status line with something like "120K/200K Fable 5", it's nice.

Re: Maximizing the value of your Claude Code sessions

#35

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

As far as I've seen /clear is the same thing as starting a new session.

If you type /resume right after clear, the first thing in the list is the session you just cleared.

Re: Maximizing the value of your Claude Code sessions

#36
post #18

Earlier quoted context omitted.

dude, if you try to do harness development yourself you will realize that most things said in this blogpost is shared with any ${sufficiently_advanced_harness}. this is not really claude-specific, this is just how this class of tools, OSS or not, works

That's not my complaint. I know well the concerns of agent harnesses. My complaint is that this is a low-dimensional projection of a system which I have no insight into, and therefore, I cannot evaluate the tips myself against their source. Am I to believe the creators, knowing full well that the source will, as Boris Cherny put it in a recent interview, be deleted and rewritten from scratch at the release of the nex…

> I find this type of prose ridiculous. It conveys "this is the way things are now, get used to it".

This is absolutely what AI companies and AI lovers want you to believe

Re: Maximizing the value of your Claude Code sessions

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

Re: Maximizing the value of your Claude Code sessions

#38
post #25

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

> Opened issue for this and it was automatically closed: […]

Clarification: It wasn’t closed on submission though. It sat open ~17 days, a bot marked it stale, and it closed when nobody responded to the stale label.

The two-phase thing is the part I didn’t know until recently: the stale label is basically asking “is this still relevant?”, and answering it makes the bot back off next time around. nixpkgs does the same. Bumping feels wrong on most trackers, agreed, but at this issue volume I don’t know what else works.

Anyway a comment should reopen it. Your CLI vs desktop screenshots are a better repro than most things in that tracker.

Re: Maximizing the value of your Claude Code sessions

#39
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…

You can make your own status line with something like "120K/200K Fable 5", it's nice.

You can do tons more, really. There’s even a built-in /statusline command to modify it; mine shows both context window usage alongside session and weekly limit, all of them as progress bars. Just ask Claude to do it.

Re: Maximizing the value of your Claude Code sessions

#40
post #25

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

> Opened issue for this and it was automatically closed: […] Clarification: It wasn’t closed on submission though. It sat open ~17 days, a bot marked it stale, and it closed when nobody responded to the stale label. The two-phase thing is the part I didn’t know until recently: the stale label is basically asking “is this still relevant?”, and answering it makes the bot back off next time around. nixpkgs does the same…

Just because a Github issue doesn't have activity doesn't mean it's not an issue anymore.
Post reply on HN