Gating an AI agent's tool calls before they run A developer at Ghost Developer Studio built Agent Seatbelt, a free, MIT-licensed, dependency-free Python tool that intercepts every AI coding agent tool call before execution and denies or escalates the dangerous ones to a human. The tool was created after a close call in which an agent began deleting files during a cleanup task, and it is designed to enforce checks every time rather than relying on a person watching the agent in real time. I like AI coding agents. I use them, I build with them, and I have learned a lot from watching how they work. I also do not trust them with my files without a check in between. That is not a contradiction. It is the same reason I like a fast car and still want brakes. An agent is useful because it can act. It can read files, run commands, edit code, and move things around, all in one long run. That is also what makes it risky. A single mistaken tool call can delete the wrong folder, change a file you did not mean to change, or run a command you would not have approved if you had seen it first. The agent is not trying to cause harm. It is following a plan, and sometimes the plan is wrong, or the instruction it was given was unclear, or it misread the state of the project. Agent Seatbelt is a tool I built for that gap between a plan and an action. It is a free, MIT licensed Python tool from Ghost Developer Studio, and it has no dependencies. It reads every AI coding agent tool call before it runs, and it denies or escalates the dangerous ones. You can find it at https://ghostdeveloperstudio.com/agent-seatbelt/safety/ https://ghostdeveloperstudio.com/agent-seatbelt/safety/ The idea is simple, and I think simple is the right shape for a safety tool. Before a tool call runs, Agent Seatbelt looks at what the agent wants to do. If the call looks safe, it goes through. If it looks dangerous, it is denied, or it is sent to a person to decide. The agent does not get to run first and explain later. The check happens before the action, which is the only point at which a check can stop the action. I started building it after a close call of my own. I had asked an agent to clean up a project, and it started removing files I had not meant to include in that cleanup. I stopped it in time, and nothing important was lost, but it made me think about how much I was relying on my own attention. I was watching the agent work, but I was not reading every tool call in full. No one does, not for a long run. That is the problem. If safety depends on a person catching every risky call in real time, it will fail on the day that person is tired, distracted, or looking at another window. So I moved the check into a place where it runs every time, whether I am watching or not. Agent Seatbelt sits between the agent and the tools it wants to use. It is not a second agent. It does not write code, and it does not decide what the project should look like. It only asks one question, again and again: is this call safe to run as written, right now, in this project? That narrow job matters. A tool that tries to do too much is hard to trust, and a safety tool you cannot trust is worse than no safety tool at all, because it gives you a false sense of cover. I wanted something I could read, understand, and check. No dependencies helps with that. There is less code to audit, less to install, and fewer places for something unexpected to hide. If you want to know what it denies and what it allows, you can open the code and read the rules. I want to be clear about what it does not do. It does not make an agent safe in general. It does not understand the intent behind a call, and it cannot tell whether a change is a good idea. A call can be safe to run and still be wrong for the project. A call can be denied even though a person would have allowed it, because the rule it tripped was written broadly on purpose. That is a trade off, and I think it is the right one for a gate. A gate that lets everything through is not a gate. It also does not replace your judgement. When a call is escalated, a person still has to decide. The tool gives you the call, the reason it was flagged, and a chance to say yes or no before anything happens. That is slower than letting the agent run free, and I accept that. The point is not to make the agent as fast as possible. The point is to make it fast enough while keeping the dangerous actions in front of a human. What I have found in practice is that the gate changes how I work with agents. I give them clearer instructions, because I know the risky calls will be stopped and I will have to explain what I actually wanted. I also worry less while they run, because I am not the only check in the system. That is a small change, but it is a real one. I can step away from a long run without feeling like I have left the door open. If you use AI coding agents, I suggest trying a gate like this on a project you care about, and watching what gets denied or escalated in the first few runs. You may be surprised by how many calls look routine at a glance and risky when you read them closely. That surprise is useful. It tells you where your instructions are vague, where the agent is making assumptions, and where you would have wanted a second look. I built Agent Seatbelt to be that second look. It will not write your code for you, and it will not tell you whether your design is good. It will read the tool calls before they run, and it will stop the ones that should not run unchecked. For me, that is enough. The agent can keep doing the fast work, and I can keep the final say on the actions that matter.