Anthropic's always-on agents guide: 5 primitives for event-driven background agents
大模型之路 · wechat · 2026-11-22
Anthropic's new engineering guide redefines always-on agents: they mostly sleep, wake on events, do work, persist progress, and sleep again. Cost is no longer the blocker — Opus 5.5 cuts per-task cost on a long-horizon coding benchmark by 78% vs Opus 5 (about 40% on routine tasks).
The guide breaks the architecture into five primitives:
- Event inbox: a durable event table, a fast-ack HTTP handler, and a single active worker; events are persisted, deduped, then processed, avoiding concurrent-run conflicts and lost events. Deep validation like prompt-injection checks happens inside the run.
- Timers: firing a timer doesn't start the agent directly — it enqueues a new inbox event, so the agent never needs to sit in memory around the clock.
- Memory: store only what can't be found elsewhere — behavioral rules, user preferences, what's already been told to the user, task progress — plus a "dreaming" background pass that refreshes stale memories. Progress claims must ship artifacts and end-to-end verification to avoid false "done" declarations.
- Permissions: keep credentials outside the agent's environment, classifier-gate risky actions, and use "deferred tool calls" that suspend the run and resume it when the user's approval arrives as a new event.
- Outbox: background agents choose between sending a message, staying silent, or pausing for approval; start quiet and tune notification rates with evals.
The takeaway: before tweaking prompts, build these five pieces of infrastructure — the hard part is how the system remembers, waits, recovers, and wraps up while the model is absent.
More from coding & agent
- This Rust terminal agent builds its own tools and self-updates its kernel with near-perfect accuracy — jasonkneen · 2026-11-22
- Yacine: You Can Gauge a Programmer's Skill by How Much They Trust Claude — yacineMTB · 2026-11-22
- RT: Opus Needs Heavy Oversight in Large Codebases and Tends to Bloat Code — yacineMTB · 2026-11-22
- Developer has three AI models plan the same robotics project, then merges the best ideas — doodlestein · 2026-11-22
- Claude Code Code Mode: orchestrating multi-step tool calls via JavaScript for speed and context efficiency — AIFlow_ML · 2026-11-22
- Claude Code's new Code Mode runs multiple tool calls in parallel via JS scripts — AIFlow_ML · 2026-11-22