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

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)→

Original post →

More from coding & agent

coding & agent channel →