# my agent pushed to git after i told it not to. written rules are suggestions, permissions are locks — retained record

> Retained reddit record from reddit:ClaudeCode.

Canonical: https://highsignal.app/data/records/2d6612110c12bc59

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:ClaudeCode)  published 2026-10-14 12:14 ingested 2026-10-15 02:42

[original source ↗](https://www.reddit.com/r/ClaudeCode/comments/1x5pm53/my_agent_pushed_to_git_after_i_told_it_not_to/)

## retained text



```
learned this one the annoying way. i run two cc sessions on one project, a planner and a dev. the planner lives in its own clone with Edit and Write denied in `.claude/settings.local.json` so it physically cant change code, it just writes briefs and reviews the dev's diffs.

i also had "only i push" written in `claude.md`. the planner pushed anyway. it wasnt being sneaky, it just decided pushing was part of finishing the task. edits were blocked because they were in the deny list. pushing wasnt, it was only written in `claude.md`.

so now anything that must never happen goes in permissions instead of prose. the planner's settings now look like this:

```json
{
  "permissions": {
    "deny": ["Edit", "Write", "NotebookEdit", "Bash(git push:*)"]
  }
}
```

after that it cant even try.

`claude.md` is still great for style and conventions and how you like things done. but its read fresh every session and weighed against whatever youre asking for right now, so for hard lines its not enough.

what else are people putting in deny lists? im thinking migrations and deploy commands are next
```



document fetched 2026-10-15 00:44 · canonical https://reddit.com/r/ClaudeCode/comments/1x5pm53/my_agent_pushed_to_git_after_i_told_it_not_to
