laya-guard: local guardrail for coding agents blocks 25/27 AgentDojo attacks at ~90ms
Extreme_Ad5709 · reddit · 2026-10-11
A developer open-sourced laya-guard, a fully local guardrail that inspects every tool call made by coding agents and decides to allow, review, or block it.
- No API key needed; 90ms per command on CPU
- Regex rules catch obvious risks (rm -rf /, curl … | sh, leaked API keys); benign commands like ls and npm test skip the model entirely
- Everything else is judged by Laya, a 322M local model
- Supports Claude Code, Codex CLI, Cursor, Gemini CLI, Copilot CLI and 6 other agents
- Self-tested on AgentDojo at the judge level: blocked 25 of 27 attacks while allowing 92 of 97 benign tasks
MIT-licensed, install with pip install laya-guardrail.
Related event: Open-Source laya-guard Screens Coding Agent Commands Locally(2 posts)→
More from coding & agent
- Claude Opus 5.5 + Unreal Engine 5.9 used to rapid-prototype a "Wedding Videographer Simulator" — gorkem · 2026-12-02
- Dev builds Mac app that turns selected text into AI-designed posters, open-sourcing it soon — vista8 · 2026-12-02
- Every trains a writing skill on 185 posts that beats standard Claude skills 85% of the time — every · 2026-12-02
- Astral's ty type checker hits 1.0, giving OpenAI a 24x speedup over prior tooling — Simon Willison · 2026-12-02
- Agent trace eval guide: matching full-trace LLM reads at ~80% lower token cost — CShorten30 · 2026-12-02
- mdsvex 1.0 ships: full rewrite makes it a general-purpose markdown toolkit beyond Svelte — erhannah · 2026-12-02