Anthropic Releases Turnstile, Open-Source Proxy for Precise Token Capture in Agent Reinforcement Learning
Key Takeaways
- ▸Turnstile is an open-source Rust proxy that captures exact token-level sequences during agent-harness interactions, eliminating information loss that occurs in text-only transcripts
- ▸The tool solves 'retokenization drift' and 'chat template drift' problems—formatting variations that cause training signals to degrade because RL optimizes against contexts the behavior policy never actually saw
- ▸Turnstile exports generic, framework-neutral trajectory data that flows directly into existing RL training stacks without requiring harness modifications
Summary
Anthropic has released Turnstile, a Rust-based proxy that captures exact token-level sequences during agentic interactions to improve reinforcement learning training. The tool addresses a critical bookkeeping problem in RL training: text transcripts can appear identical while containing different token sequences due to formatting variations ("retokenization drift" and "chat template drift"), which causes training signals to degrade when optimizing models against slightly different contexts than they actually experienced. Turnstile sits between the model backend and agent harness, recording unambiguous token history at generation time and exporting framework-neutral trajectories compatible with existing RL training stacks. In validation tests with both text-only coding agents and multimodal computer-use agents, Turnstile enabled steady improvement over RL training runs, demonstrating that precise token-level data capture is essential for effective policy-gradient optimization in agentic workflows.
- Validation tests with coding agents and multimodal computer-use agents demonstrate measurable improvements when using precise token-level data for policy-gradient training
Editorial Opinion
Turnstile addresses a subtle but significant blind spot in agentic RL workflows. The insight that text equivalence doesn't guarantee token equivalence—and that this gap corrupts training signals—reflects the kind of careful engineering required to move beyond proof-of-concept systems. By making this tool open-source and framework-agnostic, Anthropic contributes a foundational building block that should accelerate progress across the broader research community.



