logoalt Hacker News

vrosastoday at 3:26 PM2 repliesview on HN

The problem is, when the context window grows, Claude tends to forget these kinds of rules. It will then do whatever it wants. I had to outright ban comments in the global claude.md, the local claude.md AND write a hook to catch any that still slipped through.


Replies

nater5000today at 3:40 PM

I think people really need to focus more on working with limited contexts rather than trying to work around it. I really try to keep my sessions as short as possible and it helps a ton with keeping Claude (et al) focused.

Specifically, I like the "canary" trick that people have discussed where you add a small, innocuous rule to your CLAUDE.md like "When responding to me, start every sentence with my name." so that when Claude stops doing this, you know you've used way too much context and need to start a new session.

show 1 reply
mandeepjtoday at 3:35 PM

> The problem is, when the context window grows,

You know the problem; then why not address it? Does Compacting the context not help?

show 3 replies