← Lab /AI/ML

TokenWall cuts attack success to 12.5% while letting 97.4% benign actions pass

TokenWall reduces unsafe behavior in persistent AI agents to a 12.5% attack success rate with 97.4% benign pass rate

AI/ML arXiv 9 Jul 2026 Defense Prototype evidence Threat model

Published as “Token-Flow Firewall: Semantic Runtime Auditing for Persistent AI Agents”

Why it matters

TokenWall offers a practical, low-latency runtime defense that can be deployed locally for personal AI agents without sending sensitive context to remote models.

Summary

TokenWall cuts the attack success rate on the CIK-Bench benchmark to 12.5% while still allowing 97.4% of benign executions, and it adds only 0.69 seconds of latency per benign case. The paper reports these numbers on 88 attack cases and 38 benign cases, comparing against several existing runtime defenses.

What they found 2

  1. Attack success rate reduced to 12.5% on CIK-Bench.

    “TokenWall reduces attack success rate to 12.5% while maintaining a 97.4% benign executable pass rate without human confirmation.”

  2. Additional latency of only 0.69 seconds on benign cases.

    “TokenWall further introduces only 0.69 seconds of additional latency on benign cases, demonstrating that semantic runtime containment can achieve a practical security-utility trade-off for persistent AI agents.”

Caveats 4

  • Our evaluation is limited to the available benchmark setting for OpenClaw-style personal agents.
  • Although the benchmark covers representative persistent-state and tool-use risks, it cannot capture the full diversity of personal-agent deployments, data sources, user preferences, and long-horizon interaction patterns.
  • The method also depends on the quality of the local small-model auditor and the runtime metadata exposed to it.
  • Finally, our prototype focuses on runtime containment of unsafe transfers rather than complete agent security. It does not address compromised hosts, credentials stolen outside the agent runtime, denial-of-service attacks, or cases where a user explicitly authorizes a harmful action after an accurate warning.

What’s new here 4

  • Audits semantic token flows at the moment they cross runtime boundaries, before state mutation or tool execution.
  • Combines a deterministic precheck with a lightweight local small-model auditor and escalates only ambiguous high-risk flows to a stronger arbiter.
  • Supports recoverable rewriting of unsafe spans rather than blunt blocking.
  • Provides full-coverage pre-execution mediation with far lower latency than remote large-model auditing.

Threat model stated by the source

AdversaryCan influence any content observable by the agent, including web pages, emails, shared files, tool outputs, and user-provided inputs.
CapabilityInject malicious content that may persist via memory or be reused in later sessions; exploit tool interfaces and external APIs.
AssumesAdversary cannot compromise the underlying host or tamper with the firewall.; Adversary cannot modify audit logs or protected runtime metadata.; Adversary cannot execute code outside the agent’s normal execution path.; Adversary has no access to private user data or internal firewall decisions at attack time.