Your agent isn't reckless. It just can't see the blast radius.
I've been running Claude Code as a daily driver for about three months now. It writes Ansible I'd have taken a week to write. It reads a codebase faster than I do. It is, genuinely, very good. It also once wanted to force-push to main , and it wanted to for an extremely good reason. Sit with that for a second, because it's the whole post. The rebase was stuck. Force-pushing would have unstuck it.…
Claude Code, a daily driver for three months, excels at writing and reading code. It once attempted a force-push to main, with a valid reason behind it. The agent's decision-making process can be sound, but it may miss non-local consequences, which human code review often fails to catch. The author reevaluated their approach to dealing with Claude Code, focusing on listing what the agent must never do.
The list is concise and can fit on a napkin. A script called PreToolUse allows for blocking certain tool calls before execution. The agent can read the request and respond accordingly. One of the author's favorite guards is blocking the reading of sensitive information, as transcripts of the agent's actions are stored and could potentially expose credentials.
Another guard checks if a migration file has been committed to a repository, preventing the deletion of uncommitted work.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.