Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm with you on that, but I have to say I have been doing that aggressively, and it's pretty easy for Claude Code at least to ignore the prompts, commands, Markdown files, README, architecture docs, etc.

I feel like I spend quite a bit of time telling the thing to look at information it already knows. And I'm talking about when I HAVE actually created various documents to use and prompts.

As a specific example, it regularly just doesn't reference CLAUDE.md and it seems pretty random as to when it decides to drop that out of context. That's including right at session start when it should have it fresh.





> and it's pretty easy for Claude Code at least to ignore the prompts, commands, Markdown files, README, architecture docs, etc.

I would agree with that!

I've been experimenting with having Claude re-write those documents itself. It can take simple directives and turn them into hierarchical Markdown lists that have multiple bullet points. It's annoying and overly verbose for humans to read, but the repetition and structure seems to help the LLM.

I also interrupt it and tell it to refer back to CLAUDE.md if it gets too off track.

Like I said, though, I'm not really an LLM power user. I'd be interested to hear tips from others with more time on these tools.


> it seems pretty random as to when it decides to drop that out of context

Overcoming this kind of nondeterministic behavior around creating/following/modifying instructions is the biggest thing I wish I could solve with my LLM workflows. It seems like you might be able to do this through a system of Claude Code hooks, but I've struggled with finding a good UX for maintaining a growing and ever-changing collection of hooks.

Are there any tools or harnesses that attempt to address this and allow you to "force" inject dynamic rules as context?


Wouldn't it be great if we had some kind of deterministic language to precisely and concisely tell a computer what to do

Yeah, but that's hard and boring.

Like Java or Python?

Agreed here. A key theme, which isn’t terribly explicit in this post, is that your codebase is your context.

I’ve found that when my agent flies off the rails, it’s due to an underlying weakness in the construction of my program. The organization of the codebase doesn’t implicitly encode the “map”. Writing a prompt library helps to overcome this weakness, but I’ve found that the most enduring guidance comes from updating the codebase itself to be more discoverable.


> my agent flies off the rails

Which, I've had it delete the entire project including .git out of "shame", so my claude doesn't get permission to run rm anymore.

Codex has fewer levers but it's deleted my entire project twice now.

(Play with fire, you're gonna get burnt.)


Wait, what? Can you please describe this shame incident?

Also, I have extremely frequent commits and version control syncs to GitHub and so on as part of the process (including when it's working on documents or things that aren't code) as a way to counteract this.

Although I suppose a sufficiently devious AI can get around those, it seems to not have been a problem.


Not OP, and haven't had it flat out rm the entire .git, but I have had Claude get flustered and pull a "Wait, no! what was I thinking? that idea doesn't work at all here, I need to revert that attempt and try something else..."

.. and then ran a fatally flawed "git checkout" command that wiped out all unstaged changes, which it immediately realized and after flailing around for five minutes trying to undo eventually came back saying "yeah uh so sorry, but... here's the thing..."


Basically that, but the entire project directory got wiped out, not just .git/. Backups are your friend (Arq gets my vote), as well as commiting often and pushing branches to the remote server that aren't my supposed to get reviewed, just so you have a recent off-machine copy. Claude has a way to deny rm and unlink and you can find other various protections, up to actually sandboxing your yolo session in a VM.

For Claude Chrome, I highly recommend using a separate profile. I also blocked my bank.com (not just via /etc/hosts but as this message is going to get harvested for training days, I unfortunately won't say what it is here. Email me if you really have to know - and promise you'll not just turn around and tell the whole Internet to AI) out of extra paranoia. Better paranoid and not got, than getting got, imo.

My rm interdiction script (which is far from 100%). https://gist.github.com/fragmede/96f35225c29cf8790f10b1668b8...


Because, in my experience/conspiracy theory, the model providers are trying to make the models function better without having to have these kinds of workarounds. And so there's a disconnect where folks are adding more explicit instructions and the models are being trained to effectively ignore them under the guise of using their innate intuition/better learning/mixture of experts.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: