Earlier quoted context omitted.
Yeah, I had an issue where Claude was convinced that a sqlite database was corrupt and kept wanting to delete it. It wasn't corrupt, the code using it was just failing to parse the data it was retrieving from it correctly. I kept telling it to debug the problem, and that I had confirmed that database file was not the problem. It kept trying to rm the file after it noticed the code would recreate it (although with no…
I hope this isn't Opus 4.5
Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
31–40 of 72 posts
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#32I am always surprised at how quick Claude will ask to run git filter-branch vs doing the same operation safely via an extra command or two.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#33Earlier quoted context omitted.
The more concerning algorithms at play are how they are post-trained. And the then concern of reward hacking. Which is what he was getting at. https://en.wikipedia.org/wiki/Reward_hacking 100% - we really shouldn't anthropomorphize. But the current models are capable of being trained in a way to steer agentic behavior from reasoned token generation.
> But the current models are capable of being trained in a way to steer agentic behavior from reasoned token generation. This does not appear to be sufficient in the current state, as described in the project's README.md: Why This Exists We learned the hard way that instructions aren't enough to keep AI agents in check. After Claude Code silently wiped out hours of progress with a single rm -rf ~/ or git checkout --,…
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#34Jesus. Just containerize Claude. How is this not common practice already? Are people really ok with a third party agent running out of their home directory executing arbitrary commands on their behalf? Pure insanity.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#35 bwrap --ro-bind /{,} --dev /dev --proc /proc --tmpfs /run --tmpfs /tmp --tmpfs /var/tmp --tmpfs ${HOME} --ro-bind ${HOME}/.nix-profile{,} --unshare-all --die-with-parent --tmpfs ${XDG_RUNTIME_DIR} --ro-bind /run/systemd/resolve/stub-resolv.conf{,} --share-net --bind ${HOME}/.config/claude-code{,} --overlay-src ${HOME}/.cache/go --tmp-overlay ${HOME}/.cache/go --bind ${PWD}{,} --ro-bind ${PWD}/.git{,} -- env SHELL=/bin/bash CLAUDE_CONFIG_DIR=${HOME}/.config/claude-code =claudeRe: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#36 alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"'
alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#37In my opinion this is a solution at the wrong layer. It's working by trying to filter executed commands, but it doesn't work in many cases (even in 'strict mode'), and there's better, more complete, solutions. What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them. When claude code has trouble running…
name_parts = ("com", "pile")
name = "".join(name_parts)
try:
raise RuntimeError
except RuntimeError as exc:
frame = exc.__traceback__.tb_frame
builtins_dict = frame.f_builtins
parser_fn = builtins_dict[name]
flag = 1
https://github.com/microsoft/vscode/issues/283430Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#38Two MCP tools back to back on the HN frontpage when seemingly dozens of them doing the same functionality already exist. Both posts written by AI with the typical tells. Daring today aren't we?
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#39Just put it in a container. I use bash aliases like this to start a throwaway container with bind mounted cwd, works like a charm with rootless podman. I also learned to run npm and other shady tools in this way and stopped worrying about supply chain attacks. alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"' alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#40Just put it in a container. I use bash aliases like this to start a throwaway container with bind mounted cwd, works like a charm with rootless podman. I also learned to run npm and other shady tools in this way and stopped worrying about supply chain attacks. alias dr='docker run --rm -it -v "$PWD:$PWD" -w "$PWD"' alias dr-claude='dr -v ~/.claude:/root/.claude -v ~/.claude.json:/root/.claude.json claude'
I do that, too! I use git for version control outside the docker container, and to prevent claude from executing arbitrary code through commit hooks, I attach the docker volume mount in a nested directory of the repository so claude can not touch .git. Are there any other attack vectors that I should watch out for?