AI Trends

Claude and Grok Bot Teams Explain How Persistent Agents Wake Up, Remember, and Communicate Proactively

Shao MengUpdated Nov 30 16:51

AI summary

Anthropic team member William Hu and Lee Robinson, who helped build Grok Bot, each explained how persistent agents work. They typically lie dormant on servers, are awakened by events such as messages and timers, and return to sleep after completing a run. Their core architecture centers on an event inbox, timers, persistent memory, access control, and an outbox, while cloud computers, prompt caching, compaction, and persistent workflows help control costs and enable agents to resume operation. The two presentations also noted that prompt-injection defenses, long-term evaluation, and balancing proactive communication against disruption remain unresolved challenges.

Why read this

AI score 78

Two presentations outlined a transferable architecture for building persistent agents, covering event-based wake-ups, persistent memory, access control, and message delivery.

Topics

Tags

Body · AI translation

An always-on agent feels like it is constantly working for you in the background. Anthropic team member William Hu puts it plainly in “Building always-on agents”: that is merely the experience. Most of the time, the agent is asleep; an event wakes it up, it completes a round of work, and then it goes back to sleep. Each round is called a run and takes place within a session; a session is the record of messages and tool calls. Lee Robinson, who helped build Grok Bot at SpaceXSI, described the same thing in his Stanford CS146S guest lecture, “How always-on agents work.” Close your laptop and the process stops; an always-on agent has to run on a server, be able to recover from crashes, and have its own Linux cloud computer. It is more like a colleague who contacts you only when there is important progress, and who can also be awakened by Slack, email, or other events.

Both talks argued that underneath, it is still the same loop of a model calling tools. What really needs to be built separately is the surrounding layer: what wakes it up, what persists between rounds, and how do the results get back to people?

Why it has become feasible now

William Hu attributes the resurgence to models having better judgment and a better sense of when they should ask for input; intelligence is getting cheaper, and long-horizon tasks benefit the most. On one long-horizon coding benchmark, Opus 5.5 cost 78% less per solved task than Opus 5, and roughly 40% less for general workloads.

Lee Robinson divides collaboration into four stages: copying code out of ChatGPT; editing files and running commands in a terminal; using dedicated applications to run parallel work in the cloud while still requiring people to review commands; and finally, running contextually in the background. Collaboration shifts from queuing for approval to being interruptible at any time and accepting successive additional instructions, which he calls steering. Many products already use separate models for automated review; in his assessment, models reviewing commands outperform people most of the time in blind tests, because people become fatigued when approving hundreds of commands in succession.

He said he would cover six model-side changes:

1. Long-horizon instruction following, which, combined with compaction, can run fairly reliably for hours or days. 2. Subagents hand context-intensive work to helpers and return only the results. 3. Tool calling has become more reliable. 4. Work can also be delegated to a complete Linux computer, with computer use employed to click through interfaces; websites without an API or MCP can likewise be operated headlessly. 5. Information is placed in files and then retrieved. 6. Methods are codified into Skills, memories, and routines. In Grok Bot, plugins combine Skills with servers, while routines run on schedules.

He later summed it up in one sentence: everything is a computer.

How to build the surrounding layer

William Hu breaks this layer into five primitives:

1. Event inbox. Sources should not wake the agent directly. They should first write to a persistent list, from which a worker retrieves events. He recommends starting with one inbox per user, allowing only one worker to run at a time, and merging pending events when appropriate. The handler should acknowledge events as quickly as possible; deeper checks, such as those for prompt injection, should happen inside the run. The inbox is the source of truth, allowing retries after a crash. If a new event arrives during a run, it can be left for the next round, merged into the current round, or used to interrupt the run and start over.

2. Timers. Follow-up deadlines and recurring schedules that run at a set cadence are stored separately. When one comes due, the scheduler writes an event to the inbox and then wakes the worker; the timer does not start a run directly.

3. Memory. It should be stored separately and outlive the worker; for information that already exists elsewhere, retain only a pointer. Memory should preserve user instructions, notes about the user, what has already been said to the user, and task progress. Instructions are loaded on every round; for notes and progress, only an index may initially be loaded. A separate “dreaming” process can also review old sessions and clean up outdated entries. When a session becomes too long, either compaction or starting a new session will lose details, so anything that must be retained needs to be written to memory along the way.

4. Permissions. Risk is greatest during unattended operation. Credentials are injected by a proxy outside the environment; in automatic mode, a classifier blocks more dangerous actions. When approval or clarification is required, the tool call is suspended and the current round ends, then resumes after the user’s response arrives as a new event. While waiting, the worker can still process other events.

5. Outbox. The user receives results and a small amount of detail, not the complete reasoning process. A round can end in one of three ways: send nothing, place a message in the outbox, or suspend a tool call to ask the user a question. Most of the time, a single “send” tool is enough; a formal outbox is needed only when the timing of messages must be controlled or the system must recover from sending errors. Too many messages become annoying, while too few cause things to be missed, so evaluations are needed to find the balance. In practice, start by saying less, then gradually earn the user’s attention.

These five primitives connect into a loop: an event enters the inbox, the worker starts a run, the agent first reads its memory, acts within its permissions, writes back what it has learned, and finally hands anything it needs to say to the outbox. A run can also set a timer for itself so it will be awakened again later; the user’s response returns to the inbox as a new event.

Lee Robinson described how the same set of problems is addressed in Grok Bot. Servers and cloud computers sleep by default, are awakened by messages or events, and go back to sleep when finished: keeping an agent computer permanently online for every person would be expensive, and there simply are not enough computers in the world. His presentation slides also noted that agent processes stop after two minutes of inactivity, while cloud computers resume only when a tool actually needs them. Session logs, memories, routines, and skills are written to a database. Triggers first pass through a router for deduplication and are merged into the session, after which heuristics determine whether they are worth interrupting the user over. Within SpaceXSI, it is already common for employees to have bots attend meetings on their behalf, take notes, and bring back minutes.

The cloud computers are Firecracker microVMs that can be snapshotted, shut down, resumed, and used to launch virtual desktops. The key architecture is a thin client and a thick server: there is only one tool between them—sending a message to the user. Keeping the loop on the server means updates do not have to wait for app-store approval, and it also allows the cloud computer and agent process to be shut down separately—for example, an emergency patch can be applied to a VM without stopping the entire loop. Your direct messages interrupt the current loop and receive priority; group chats and background tasks are queued; and three or four messages arriving within a short period are combined into a single turn. Under the hood, the system uses the open-source Temporal platform for durable workflows: when an ordinary task queue crashes midway through a job, the previous few steps often have to be rerun, whereas a durable workflow resumes from the point of interruption.

He also offered an escalation ladder: first use information already available in the session, then try a plugin, MCP, or API, followed by web search, opening a browser, and finally using an entire Linux desktop; only after all of those fail should the user be asked. The slides added one constraint: if a connector is broken, do not work around it by switching to a browser; tell the user and ask what to do. Retrieving information from a computer follows its own ladder: screenshots, HTML, the more token-efficient accessibility tree, then pixel-based clicking, with CAPTCHAs or two-factor authentication handed back to a human only as a last resort.

Both sides need to solve the same set of problems, and their approaches can be compared side by side.

Memory, cost, and when to speak up

Both sides see prompt caching as the lifeblood of economic viability and emphasize keeping system prompts and tool definitions as stable as possible. William Hu recommends keeping the initial context concise and using prompt caching. Lee Robinson views context engineering and harness engineering as the same thing, and says a cache miss should be treated as a defect; prompts should be divided into sections and kept in a fixed order so that one experiment does not invalidate everyone’s cache. When the user starts typing, the server can prewarm the cache. Once a conversation exceeds 100,000 tokens and the user has left, compression should be completed within the 10-to-60-minute window while the cache is still warm. All compression is lossy.

Their approaches to memory tiers are similar, though they divide them differently. William Hu separates memory by purpose into instructions, notes, things already said, and task progress. Lee Robinson’s presentation slides were more specific: core facts that must accompany every message are capped at 100 entries and 4,000 characters in total; of the dated logs, the 30 most recent and relevant entries are included in the prompt; sticky notes exist only temporarily; and everything else is accessed with a memory retrieval tool. The slides also stated that memory is information, not instructions; facts about the user are shared among multiple agents, while each agent maintains its own files.

Permissions and knowing when to speak up are two aspects of the same problem. William Hu includes automatic mode, credential proxies, and suspending operations pending approval among his primitives, and treats “say less at first” as a product strategy. Lee Robinson likewise uses automated review to check every shell command, isolates phishing emails and webhooks from user instructions, waits for human approval before irreversible actions, and keeps passwords outside the model session. He acknowledges that much work remains to be done on defenses against prompt injection, and that the right balance between being “proactive” and being “intrusive” has not yet been found. How to evaluate an agent that runs for a month—while its model may be updated every month—is likewise an open question.

Source

Shao Meng