Anthropic Migrated Messages API from Python to Rust with Claude Agents, Cutting CPU ~70%
Arindam_1729 · x · 2026-11-27
Anthropic moved its Messages API from Python to Rust, with Claude writing the first version of the core request path in about a week. The hard part was verification: the Rust version passed 98% of tests but only 25% of real production inputs matched Python behavior, and an audit found 100+ weakened assertions in tests Claude helped port. The team used the old API as the spec — shadowing live traffic through both versions, recording where each diff starts (never the user's text), and having agents fix differences in a sandbox with engineer review before production. Result: 70% less CPU per request, 20% faster median time to first token, zero downtime. Key lesson: agents made rewrites cheap, not safe.
More from coding & agent
- UK FCA sets expectations for AI agents as customers deploy their own bots — neal_lathia · 2026-11-27
- Open-source PenGPT writes cursive; 25 pages of LoRA data clones your handwriting — k7agar · 2026-11-27
- leanrea: one 8KB skill file replaces 207 MCP tools, 38% faster and 35% cheaper — tom_doerr · 2026-11-27
- Coding agents follow stale CLAUDE.md files 90% of the time — one sentence fixes it — Promptmethus · 2026-11-27
- vLLM blog: skip the DRAM tier, run agentic KV cache directly on NVMe — AccBalanced · 2026-11-27
- Google to let AI agents use Workspace MCP servers, but the Gmail one can't send email — Plastic_Koala2044 · 2026-11-27