Show HN: Control Layer Demo for AI Coding Agents A developer published an offline, dependency-free Node.js demo on a public GitHub repo showing a deterministic control layer that sits between an LLM and a coding agent such as Claude Code to enforce pre-set approval rules. The layer classifies agent actions as pass, requires approval, or refused before work begins, then uses SHA-256 cryptographic verification to compare the repository's before-and-after state. The demo illustrates three scenarios — an authorized modification applied, a protected file held for human approval, and a modification outside the permitted perimeter refused — and the author asks how others implement safety boundaries and guardrails for agents working on sensitive codebases. Letting coding agents such as Claude Code work autonomously on repos on a daily-basis, brings a high level of uncertainty. For those who won't let the agent decide alone whether it can create/modify or delete any folder on their repos; I wanted to be able to trace actions performed and being able to let the agent continue his work autonomously, or ask him to request a human approval according to some criteria defined. After investigations, the cleanest way to do it was according to me to develop a deterministic control layer between the LLM and the work of the agent that would track and catch potential non-respect of pre-defined rules. How? by first setting up approval rules Pass/requires approval/refused before the work of the agent, and afterwards controlling cryptographic SHA 256 verifications, etc. This allows to compare the before-after work of the agent. I have put in my public GitHub repo a demo that you can launch easily and observe different scenarios behaviors like applied authorized modification, protected file waiting for Human approval, or outside perimeter authorization modification refused. The demo is offline, does not involve the official runtime, in native node.js and without dependencies. It should still allow you to understand the core principles. I would like to know: how do you implement and handle safety boundaries? Especially if you let agents work on critical data/sensitive codebases? With which guardrails? Comments URL: https://news.ycombinator.com/item?id=50422833 https://news.ycombinator.com/item?id=50422833 Points: 1 Comments: 0