Always-On Agents Actually Spend Most of Their Time Asleep
A $200 harness runs for 6 hours; a $9 single agent runs for 20 minutes. The difference isn't which is faster—it's whether what comes out is usable. Along Anthropic's agent infrastructure thread, several concepts are easy to get backwards.
Anthropic scatters its agent infrastructure material across three places: the Engineering Blog, Research, and the Claude Cookbook. To read it by theme, you first have to draw a map yourself. One developer did this while revising their own agent project, and put together a six-stop reading route: Runtime, Context, Memory, Multi-Agent, Tool, and Eval.
On that map, the first stop is the easiest to be misled by the name.
Always-on Agents Spend Most of Their Time Asleep
William Hu puts it plainly in 'Building always-on agents': always-on describes the user experience, not the process state. An agent sleeps the vast majority of the time, wakes up on an event to do one run, writes its state back when done, and goes back to sleep. A run lives inside a session, and a session is the ledger of messages and tool calls.

Once it wakes up, it has to handle five things: an event inbox, timers, memory, permissions, and an outbox. The loop assembled from these five pieces is the real long-lived online entity.
First, the event inbox. Most agents start only when the user sends a message; an always-on agent has to accept webhooks, scheduled tasks, and background jobs. Letting every event source call the agent directly causes problems: two events arriving at the same time will collide, and if the process crashes, the event is lost. So you insert an inbox layer in between, usually a relational database table. A handler quickly writes and acks, and a worker pulls pending items from the table.

Several practical details: the inbox must be the single source of truth, so if a worker crashes and restarts it can resume from the same row; only one active worker can be attached to an inbox at any given time; if a user sends several messages in a row, the worker can merge them into one run so the agent replies only once. The original article suggests partitioning inboxes by user first, and only splitting further when parallelism is needed.
Timers fall into two categories: follow-ups are alarms the agent sets for itself, and schedules are tasks repeated at a fixed cadence. They are stored in a separate table, apart from the inbox, because the inbox only holds events that are ready to process. A scheduler polls periodically and, when the time comes, drops an event into the inbox.

Three Easy-to-Confuse Things in Context
Many teams treat compaction, tool-result clearing, and memory as one thing, but they each cover a different span. Compaction compresses the current context, tool-result clearing removes tool returns that are no longer needed, and memory is responsible for preserving information across sessions. The original wording is clear: you cannot replace all of them with a single Memory Store.
Once the number of MCP tools grows, dynamically discovering tools and compressing the tokens consumed by tool definitions also fall under context engineering. If this part is done poorly, the context budget gets eaten by the tool descriptions themselves.
There is also a concept called context anxiety: when a model realizes it is about to hit the context limit, it wraps up early and rushes the work to a close. Compaction preserves continuity, but it does not give the model a clean start, so this anxiety may remain. Context reset simply clears everything and starts over, at the cost of needing a sufficiently complete handoff file; otherwise the next agent cannot pick up.
Memory Is Not Just a Vector Store
The truly hard part is how information is formed, merged, corrected, and updated. Anthropic mentions four actions—formation, consolidation, correction, and dreaming—that are worth looking at together.
Implementation-wise, in Anthropic's own products memory is a file directory; in always-on scenarios it maps to a database or object storage, so memory outlives workers. The directory usually contains four kinds of things: user instructions, notes on user preferences, content already said to the user, and a progress file for each task in progress. The principle is to store only what the agent cannot look up again; for anything that already exists in another system, just store a pointer.

On the retrieval side, there is another practice worth examining called contextual retrieval: add the surrounding context to each chunk, then layer embedding, BM25, and reranking. Retrieval over long documents improves noticeably.
Parallel Multi-Agent Does Not Mean Faster
Anthropic's Multi-Agent Research System uses an orchestrator-workers structure: the main agent splits tasks, sub-agents run in parallel, and finally results are aggregated. The structure looks beautiful, but splitting, context isolation, inter-agent communication, result aggregation, and error handling each come at a cost.
There is also a common misunderstanding to clear up: that research system demonstrates experience with multi-agent division of labor and collaboration, not a general-purpose A2A communication protocol. If you really want distributed agents, you still have to solve message protocols, mailboxes, identity authentication, state synchronization, and reliable delivery yourself.
Tool and Skill are also two different things. A Tool provides concrete execution capability; a Skill packages the process, knowledge, and resources needed to complete a certain type of task. Once the tool ecosystem grows, Tool Registry, dynamic discovery, progressive disclosure, and programmatic invocation all become problems that must be solved.
The Two Harness Pieces Have the Highest Information Density
If time is limited, read 'Effective harnesses for long-running agents' and 'Harness design for long-running application development' first. The former explains how a long-running agent goes off the rails; the latter explains how to use a multi-agent structure to raise quality.
The first piece, written by Justin Young, lists four typical failures: trying to finish all the work in one go, leaving half-finished artifacts in the environment, marking work complete without testing, and not knowing how to run things so it can only guess. The corresponding solutions are very engineering-oriented: in the first session, an initializer agent sets up the environment and writes a feature list, a progress file, the initial git commit, and init.sh; each subsequent coding agent does only one feature, then commits, writes progress, and runs the basic tests.
The feature list detail deserves another sentence. They have the initializer expand a single requirement into more than two hundred verifiable feature points, each with a passes field, all initially false. They chose JSON rather than Markdown because models are less likely to arbitrarily change JSON. This observation is very practical.
There are also concrete conclusions about testing. Running unit tests and curl is not enough; you have to give the agent a browser automation tool so it can click like a human. The author mentions that Puppeteer MCP noticeably improved results, though it also has blind spots—for example, it cannot see browser-native dialogs, so features that depend on such dialogs are prone to lingering bugs.

The second piece, written by Prithvi Rajasekaran, is more like a GAN: separate generation from judgment. The Generator does the work, and the evaluator finds flaws. The reason is that when a model grades its own work, it keeps praising it, even when the finished product looks unremarkable to humans.
To make 'good design' scoreable, they defined four criteria: design quality, originality, craft, and functionality. The deductions are written quite specifically; an obvious AI-style pattern such as purple gradients stacked on white cards is explicitly counted as a fail. The evaluator uses Playwright MCP to directly operate the page, take screenshots, turn pages, assign scores, and write critiques; the feedback then goes back to the generator, and it iterates round after round, 5 to 15 rounds, running for up to four hours.
The cost comparison is striking. For the prompt 'make a 2D retro game editor,' a single agent runs for 20 minutes and costs $9; the level editor can open, but the core game cannot run. A complete harness runs for 6 hours and costs $200, and it has a sprite editor, AI-generated levels, and a playable play mode. Twenty times the money buys whether the thing is usable.


There is a more interesting passage after that. After Opus 4.6 was released, the author dismantled the harness layer by layer, eventually cutting the entire sprint structure and letting the model sustain two hours of continuous building on its own. The DAW example ran for 3 hours 50 minutes and cost $124. His conclusion is: every component in a harness corresponds to an assumption—an assumption about what the model cannot do yet. As models get stronger, assumptions expire, and components turn from support into overhead. So the evaluator is not something to keep forever; it depends on whether the task is still beyond the boundary where the model can reliably work alone.
Eval and Security Are Unavoidable in Production
Agent eval cannot just check whether the final answer is correct. Execution traces, tool selection, task state changes, and whether the agent can recover after interruption all have to be examined. Security cannot rely on a few rules written in the prompt either; it has to be enforced through permissions, sandboxes, trust boundaries, and policy execution.
The always-on agent area has the highest risk, because it holds the user's access permissions and by default runs unattended. The original article gives several practices: put credentials in a proxy outside the agent environment and inject them when a request passes through; route high-risk actions to a classifier for review; for tool calls that require user approval, suspend them, save the session to disk, wait for the user's reply as a new event entering the inbox, and resume after waking.
One Route
If you just want to read in order, you can go like this:
- 'Building always-on agents' and 'Effective harnesses for long-running agents'—first get Runtime and failure modes clear.
- 'Effective context engineering' and the cookbook piece on memory, compaction, and tool clearing—separate the three concepts.
- 'How we built our multi-agent research system' and 'Building effective agents'—look at collaboration structures and costs.
- 'Writing effective tools for agents,' Agent Skills, and 'Code execution with MCP'—fill in the tool layer.
- The Eval and security pieces—put them last.
One developer said that the biggest gain from putting together this list may not be reading a few more links; it is more important to put concepts in the right positions within a loop: who is responsible for waking up, who is responsible for remembering, and who is responsible for verifying. Put them in the wrong positions, and what you build will collapse somewhere inconspicuous.
发布时间: 2026-12-02 06:29