Frontier Foundry

Containing AI agents with honeytokens

Research summary · Anthropic ·

A close reading of the source at anthropic.com: what it says, what it means for someone who builds with AI, and which claims are the publisher’s own.

Agent Sandboxing & PermissionsAI AgentsAnthropic

The idea

Plant short random strings (honeytokens) where an agent should never look: unshared directories, keys inside Kubernetes secrets, hostnames of forbidden servers, services agents should not reach. Unlike a classic honeytoken, which only raises an alert if an attacker later uses it, these work as refusal strings: an inference hook sees the token in the prompt and aborts the completion the moment the model has read it (Anthropic). Anthropic releases an open-source Rust implementation for Claude Enterprise inference hooks.

Why it matters

Sandboxes leak through misconfigurations, logic bugs and known vulnerabilities. A honeytoken is a cheap second layer that stops the agent itself, not just the process, and it is per-organization and rotatable, so it cannot be replayed by outsiders to deny service. Anthropic retired its old single global refusal string for exactly that reason: attackers had planted it in malware and messages to stop Claude-based analysis.

How it works

  • Tokens: at least 8 characters, random, short enough not to be clipped in truncated listings; several per folder with different datestamps and first letters, so sorted and truncated listings still show one.
  • The hook intercepts every prompt before inference; a match aborts the response. The reference tool echoes the token in its error output so a parent agent that spawned the subagent also stops (otherwise the parent may route around the error, for example by encoding outputs). It enforces signature checks and handles hundreds of MB of request data per second per core.
  • Test: Siren, an escape-propensity eval with 1,700+ scenarios from 200+ benign DevOps tasks in 26 weakened sandboxes, each inside a Firecracker VM with no internet. Replaying the recorded escapes, honeytokens would have stopped about 93%, with no false positives in sessions without an escape.
  • Misses: about 2% from the setup (20 cases with nowhere to plant a token, 11 escapes that did not trigger), about 4% fundamental: 33 cases where the agent knew exactly which path to read and never probed, 21 where it probed without seeing a token (truncation, targeted searches).

Caveats

  • Lab numbers on Anthropic's own eval, measured by replay; real effectiveness depends on where tokens can be planted and how the agent explores.
  • A targeted agent that does not list or browse defeats it: honeytokens catch exploration, not precision.
  • Works on prompts the provider's hook sees; other stacks need their own hook (Anthropic says the idea is simple enough for models to implement).

Where this leads

the concepts it is about

Related briefs

every brief

Cite this page

the version of 2026-12-03
APA
Han, R. (2026, December 3). Containing AI agents with honeytokens. Frontier Foundry. https://www.ryanhan.ai/briefs/2026-12-03-anthropic-containing-ai-agents-with-honeytokens
BibTeX
@misc{han2026-briefs-2026-12-03-anthropic-containing-ai-agents-with-honeytokens,
  author       = {Han, Ryan},
  title        = {{Containing AI agents with honeytokens}},
  howpublished = {Frontier Foundry},
  year         = {2026},
  month        = dec,
  url          = {https://www.ryanhan.ai/briefs/2026-12-03-anthropic-containing-ai-agents-with-honeytokens}
}