cd /news/ai-agents/show-hn-control-layer-demo-for-ai-co… · home › topics › ai-agents › article
[ARTICLE · art-166079] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

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.

read1 min views2 publishedNov 9, 2026

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

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-control-laye…] indexed:0 read:1min 2026-11-09 · —