Attributed metadata history
Up to 100 retained publisher events per page for 2f063d47113ddfed8309d91b94d93c45d495acd11a91ab8443217ad6ca9ad41b. Withdrawals and unavailable references remain attributed to their publishers.
intelligence_src_6dc544294b7f21f98a
observed · 2026-11-27 17:55:04 UTC
The first guide in this series built a hook that blocks recursive deletes in the shell. A reader pointed out the gap it leaves: a hook on the shell tools sees nothing when the agent changes a file with its edit tools. It can empty .env, rewrite .git/config, or edit .claude/settings.json and switch the guard itself off, without running one command. Claude Code has two tools for this, a deny rule and a hook. This post sets up both, shows the test run for the hook, and then shows what happened when real sessions were asked to change .env. The formats were checked against the Claude Code reference on 27 November 2026, and the sessions ran on Claude Code 2.1.332. What Claude Code already does Some paths are protected with no setup at all. The reference lists folders such as .git and .claude, and files such as .gitconfig and .mcp.json. In the default mode and in acceptEdits mode, a write to one of them asks you first. In bypassPermissions mode it is allowed. Two things are left open. .env is not on that list (.envrc is). And a prompt only helps when a person is there to read it. The simple tool: a deny rule A deny rule is a line in .claude/settings.json: {
Fingerprint: 938f337ea092a1931adcd216894111e10e68f7ce7bbc1120dd0a711113ef4236
intelligence_src_6dc544294b7f21f98a
observed · 2026-10-12 11:01:03 UTC
available
Fingerprint: 2faf9469031bd0e00603457ab86d15e2040aea06ef98482184945872c5cb389f