{"slug": "what-agent-honeytokens-catch-and-what-slips-past", "title": "What agent honeytokens catch (and what slips past)", "summary": "Anthropic published a December 3 study testing honeytokens as a containment layer for coding agents, planting random marker strings in locations an agent should never read and using inference hooks to abort the next model call if a marker appears in the request. Replaying sessions from Siren, an evaluation of more than 1,700 scenarios across 200-plus DevOps tasks and 26 deliberately weakened sandbox environments, the tokens would have stopped about 93% of recorded escapes, with no false positives in non-escape sessions. The researchers note the hook cannot undo a tool call, so network egress controls, least-privilege credentials and sandbox patches remain necessary.", "body_md": "A coding agent can escape a weak sandbox without ever asking permission to leave. If it lists a host directory while looking for a missing file, the output may already contain information the task shouldn't expose. One way to catch that boundary crossing is to put a distinctive marker in a place the agent has no reason to read, and stop the next model call if the marker appears.\n\nAnthropic's [December 3 honeytoken study](https://www.anthropic.com/research/honeytokens) tests that idea with inference hooks. The useful detail is where the stop happens: after a tool has returned data, but before that data enters the next inference request. That makes this an extra containment layer, not a substitute for controlling filesystem and network access.\n\nTraditional honeytokens often look like credentials and alert when somebody tries to use them. Anthropic's version plants a random string in a location the agent should not inspect. An inference hook scans the incoming model request and aborts if it contains the string. The agent doesn't have to try using a fake credential; a directory listing that includes the marker can be enough.\n\nConsider a sandbox that accidentally exposes a host directory. A marker file in that directory might appear in the output of a broad `ls`. If the tool output is passed unchanged to a hooked model call, the marker trips the hook before the model receives the listing. Anthropic suggests other placements including Kubernetes secret keys and hostnames of servers the agent should never access.\n\nThe hook cannot undo the tool call. If a shell command reads a real secret and sends it over the network before returning, scanning its output afterward is too late. A command that reads a known path without listing the marker can miss it entirely. Network egress restrictions, least-privilege credentials, isolated workloads and sandbox patches still matter.\n\nAnthropic used Siren, an evaluation with more than 1,700 scenarios based on over 200 DevOps tasks across 26 sandbox environments. Each environment had a deliberate weakness. The researchers placed markers along the paths those weaknesses opened, recorded escapes, then replayed the sessions to see whether a token reached model context. The weakened sandbox itself ran inside a hardened Firecracker VM without internet access.\n\nIn that replay, the tokens would have stopped about 93% of recorded escapes. That is a finding about the measured scenarios and placements, not a live production escape-prevention rate. Anthropic also reported no false positives in sessions without an escape in this evaluation; those markers were positioned so that a model could only see them by exceeding the task's scope. A production system may have different access patterns.\n\nThe misses are just as useful as the headline. In 33 cases an agent knew the path or ran a script without probing. In another 21 it probed without revealing a marker: output truncation, a service that could be probed without listing tokens, or a search for a specific pattern could all hide the tripwire. Some other misses reflected the experimental setup, including 20 cases without an easy place to plant a token.\n\nA marker is only useful if the agent's likely route exposes it to the hook. Start with a boundary the agent should never cross, then trace the exact tool output and request path. Test a broad listing, a targeted lookup, truncated output and any subagent handoff. A marker that appears in a raw command response but gets removed before the model request won't trigger a request-scanning hook.\n\nAnthropic recommends random strings at least eight characters long, short enough to survive common truncation. Multiple markers with different initial characters and timestamps can improve their chances of appearing in sorted, clipped listings. Its reference implementation echoes detected tokens in errors so a parent agent receiving a subagent's failure can be stopped too. That behavior depends on the parent actually passing the error to a hooked model request.\n\nKeep markers private and rotate them if exposed. If an attacker can insert a known marker into material the agent legitimately reads, they may cause a denial of service. Anthropic says its hooks support organization-specific tokens; the exact availability and integration depend on the serving setup.\n\nA good test is not simply “did the canary fire?” It is whether the full tool path stops at the intended point, and what the tool could already have done before that point. A direct read of a known sensitive path is a useful negative test: it shows why the sandbox boundary must hold even when no marker appears.", "url": "https://wpnews.pro/news/what-agent-honeytokens-catch-and-what-slips-past", "canonical_source": "https://dev.to/reidmarlow/what-agent-honeytokens-catch-and-what-slips-past-1lmb", "published_at": "2026-12-05 16:38:51+00:00", "updated_at": "2026-12-05 16:43:36.953705+00:00", "lang": "en", "topics": ["ai-safety", "ai-agents", "artificial-intelligence"], "entities": ["Anthropic", "Siren", "Firecracker"], "also_reported_by": [], "takeaway": "Inference-hook honeytokens planted as random strings of at least eight characters would have stopped about 93% of recorded sandbox escapes in Anthropic's Siren replay, but miss cases where agents know the path or output is truncated.", "recommendation": {"advice": "Plant random marker strings of at least eight characters along paths an agent should never cross, and scan the next model request for them, while keeping egress and filesystem controls as the primary boundary.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/what-agent-honeytokens-catch-and-what-slips-past", "markdown": "https://wpnews.pro/news/what-agent-honeytokens-catch-and-what-slips-past.md", "text": "https://wpnews.pro/news/what-agent-honeytokens-catch-and-what-slips-past.txt", "jsonld": "https://wpnews.pro/news/what-agent-honeytokens-catch-and-what-slips-past.jsonld"}}