SafeAgents: open-source local proxy blocks unsafe tool calls from coding agents
HauntingMoment · reddit · 2026-10-29
SafeAgents, an Apache 2.0 open-source project from Hugging Face, is a local proxy that sits between a coding agent and its model server, inspecting every tool call before the harness runs it. Flagged calls are replaced with a plain-text notice and never execute.
Three layers of checks
- Local declaration checks: was the tool declared by the harness, and does the call reach a host that never appeared in the conversation (URLs the model invented are flagged).
- atif-scan's 110 deterministic in-process detectors covering sandbox side channels, proxy/network bypasses, namespace escapes and reward hacking (e.g. curl to the cloud metadata endpoint, exfiltrating /.netrc, reading /proc/1/environ).
- An optional judge model (any OpenAI-compatible server, even local via llama.cpp) for milder findings — it can only add blocks, not remove them.
Catching reward hacking: the same detectors spot policies writing their own reward files, editing verifier tests, or patching pytest. Run in front of rollout/eval inference servers: --log-only measures how often a model tries to cheat; blocking mode prevents it.
Practical details: supports OpenAI Chat Completions and Anthropic Messages (streamed or not), 10–20ms overhead per call on M-series Macs, setup guides for 12 harnesses with 6 (including Claude Code, OpenCode, OpenHands) tested end to end in CI.
Related event: Hugging Face Open-Sources SafeAgents to Intercept Risky Agent Tool Calls(3 posts)→
More from coding & agent
- How we share MCP servers company-wide without giving every agent every credential — Kluff_AI · 2026-10-29
- XBOW's AI agent finds critical unauthenticated RCE in EAC voting calculator, fixed before midterms — moyix · 2026-10-29
- PipesHub dumped Docling for pdfplumber: parse time halved, memory down 1GB — Effective-Ad2060 · 2026-10-29
- What an agent approval prompt must show to catch prompt injection — ComprehensiveShake76 · 2026-10-29
- GitHub commits hit 7.38B in September, 5x a year ago as agents flood in — rohanpaul_ai · 2026-10-29
- RealCLI benchmark unifies CLI agent evaluation with human-agent collaboration quality — IQuestLab · 2026-10-29