this post was submitted on 24 Jun 2026
701 points (99.2% liked)

Programmer Humor

32026 readers
623 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] dan@upvote.au 6 points 3 days ago* (last edited 3 days ago) (1 children)

You need to use hooks to actually block it from doing things. CLAUDE.md files are just guidance, and it's not guaranteed to follow everything (and the longer the file gets, the more likely it'll ignore stuff - it should be kept as short as possible)

https://code.claude.com/docs/en/hooks

Hooks are code that runs at a certain point (eg after you submit a prompt, before a tool call, after a turn, etc) that can do some validation, verification, logging, etc.

It does still try to work around the blocks though, but it's not as bad as trying to put the restrictions in the prompt.

[โ€“] trolololol@lemmy.world 2 points 1 day ago

Yep but the granularity of copilot is "allow once" vs "allow forever". Gemini is much better: besides also having "allow for this session" it never tries to run python scripts it writes on the spot or command lines that are 4 lines long. And doesn't double down when I say I won't allow python at all.

My setup shares the same agents and skills files for both cli tools.