Day 25 — Bonus 8 May 9, 2026

Async Agents & Background Workflows

From "watch the chatbot type" to "wake me up when the PR is ready" — the persistence layer, the agent inbox, and the architectural shift that turned LLMs into colleagues you delegate to.

Read: ~22 min Level: Senior engineer accuracy Day 25 of 25 (Bonus 8)
Curriculum progress
25 / 25
01 — Core Concept

The shift: synchronous chat → asynchronous delegation

For the first three years of the LLM era, an "AI session" meant one thing: you typed, the model streamed tokens back, you waited and watched, then you typed again. That synchronous, turn-by-turn pattern is fine for 30-second answers. It is hostile to the kind of work people actually want to delegate — write the migration script, refactor that 4,000-line module, run experiments overnight, draft a 30-page report. Those tasks take hours, not seconds. Sitting there watching them stream is theatrical, not productive.

Sometime in late 2025, the industry collectively gave up on synchronous-only and shipped a different mental model. You hand the agent a task. It runs in the cloud, in its own sandbox, while you do something else. When it's done — minutes or hours later — it pings you. You review its work in an "inbox" that looks more like Linear than ChatGPT. This is what we now call async agents or background agents, and the architectural pieces that make it work are this lesson.

Analogy first. Sync agent is texting an assistant who holds the phone while they answer. Async agent is sending an assistant a task email — they pick it up, work on it from their desk, possibly delegate parts of it themselves, and reply when done. You are unblocked the moment you hit send. The whole productivity argument for AI agents — the part where one human directs ten of them — only works if the model is async.

Now precise. An async agent is an LLM agent whose execution is decoupled from the user's session. Three properties define it. (1) Persistence — every step of the agent's trajectory (LLM calls, tool calls, intermediate state) is checkpointed to durable storage so the run survives process restarts, network drops, and context compaction. (2) Out-of-band notification — the user is notified through a side channel (Slack, email, mobile push, an "inbox" UI) when the agent needs input or has finished. (3) Long horizon — runs are measured in minutes-to-hours rather than seconds, often spanning 50-500 LLM calls. The standard reference architecture has hardened around four primitives: a POST /runs that returns a run_id, a status poll at GET /runs/{id}, a webhook or inbox for human-in-the-loop interrupts, and a checkpoint store keyed by (thread_id, step). LangChain's open Agent Protocol (released August 2024, now the wire format under LangGraph Platform, Open SWE, and several third-party runners) codifies exactly these endpoints.

1Cognition's "async valley of death"

Cognition (the Devin team) coined a phrase that has become a useful unit of analysis: the async valley of death. It is the productivity dip you experience when delegating to an agent that runs for "too long to wait, too short to context-switch." A 30-second sync run is fine; a 4-hour run is fine (you go to lunch). Anything in the 3-15 minute zone is the worst — too brief to start something new, too long to stare at the spinner. The product solution is not "make the agent faster." It is to push runs past the valley with explicit handoff: the moment the agent starts, it sends you a "started" notification, and the moment it's done it sends a "review me" notification, and in between you do something else.

This is why every serious async agent product (Devin, Codex Cloud, Claude Code background runs, Cowork scheduled tasks) leads with Slack/Linear/email integration and not with a chat UI. The integration is the architecture.

If your agent product still requires the user to keep the tab open, you have not crossed the valley.

2Why this is hard — three failure modes that don't exist in sync

Context window exhaustion. A 4-hour run can easily exceed any model's context. The KLong paper (Feb 2026, see Papers below) reports trajectories that grow to millions of tokens before completion. You need an explicit context-management policy — summarization, sub-agent delegation with bounded state return, file-system-as-memory — or the run dies when the prompt overflows.

Process death and resumability. A sync run can crash and the user just retries. An async run that crashes after 90 minutes of work has a real cost — you must be able to restart from the last good checkpoint. LangGraph's persistence layer was designed primarily for this; every node execution writes a checkpoint, and resuming a thread re-hydrates state up to that point.

Untrusted intermediate output. When the agent is running unsupervised, it has more time to drift. Anthropic's own internal review of agent failures attributes most user-visible regressions in long runs not to the model getting "dumber" but to compound error — early small mistakes become unrecoverable mid-trajectory because the agent never re-checked its assumptions. The standard mitigation is process reward models or verifier sub-agents that score each major step.

A common but misleading instinct: "We just need a bigger context window." Context size helps, but Cusumano-Towner et al. (LOOP, arXiv 2502.01600) show that for long-horizon interactive agents, training the model in the target environment matters more than context length.

The reference architecture — one diagram

┌─────────────────────────────────────────────────┐ USER → POST /runs {input, thread_id} └──────────────────┬──────────────────────────────┘ │ returns run_id immediately ▼ ┌─────────────────────────────────────────────────┐ RUNNER (cloud sandbox: shell + browser + fs) ───────────────────────────────────────────── loop: 1. read state from checkpoint store 2. LLM call → action 3. tool exec (may spawn subagent) 4. write state → checkpoint store 5. if interrupt needed: emit inbox event 6. if done: emit completion webhook └──────────────────┬──────────────────────────────┘ │ ┌───────────┼───────────┐ ▼ ▼ ▼ PERSIST INBOX NOTIFY (Postgres) (UI/Slack) (webhook) │ │ │ └───────────┴───────────┘ │ ▼ user reviews / approves / replies │ ▼ POST /runs/{id}/resume RUNNER continues

The shape that matters: everything to the right of the runner is async. The user is not in the loop on each LLM call. They show up once at start, optionally once or twice mid-run for a human-in-the-loop interrupt, and once at the end to accept the result. This is the architecture every serious 2026 agent product converges on.


02 — Papers to Know

Three papers that defined the async agent stack

Foundational RL arXiv preprint 2025
Reinforcement Learning for Long-Horizon Interactive LLM Agents
Kevin Chen, Marco Cusumano-Towner, Brody Huval, Aleksei Petrenko, Jackson Hamburger, Vladlen Koltun, Philipp Krähenbühl · Apple ML Research · arXiv 2502.01600 (Feb 2025, last revised Mar 2025)
Introduces LOOP, a memory-efficient PPO variant for training agents directly in stateful digital environments (the AppWorld benchmark — 750 tasks, 9 apps, 457 APIs). Prior work treats the LLM as a frozen policy and only tunes prompts; LOOP fine-tunes the model end-to-end on its own environment trajectories. The key insight is that you can sustain rollouts of 50+ tool calls per episode without exploding GPU memory by re-using the LLM's own KV cache across the rollout. Reported: a 32B Qwen-based agent trained with LOOP outperforms GPT-4o on AppWorld by ~9 absolute points.
Why it matters: Established that the bottleneck for long-horizon agents is not the base model — it's whether you've ever trained the model on multi-step trajectories in the actual environment. Cited by every subsequent agent-RL paper of 2025-2026.
arxiv.org/abs/2502.01600
Recent · Long-horizon arXiv preprint 2026
KLong: Training LLM Agent for Extremely Long-horizon Tasks
Yue Liu et al. · arXiv 2602.17547 (Feb 2026)
Tackles the regime where a single trajectory exceeds the model's context window — research-style tasks that require hundreds of search/read/write steps. Introduces a Research-Factory pipeline that distills thousands of long-horizon trajectories from Claude 4.5 Sonnet (Thinking) and a trajectory-splitting SFT that preserves early context, progressively truncates the middle, and maintains overlap between sub-trajectories so the student can be trained on chunks. Caps off with a progressive RL stage that schedules training across multiple timeout regimes (5 min → 30 min → 2 hr). The resulting 106B KLong model surpasses Kimi K2 Thinking (1T) by 11.28% on PaperBench and generalizes to SWE-bench Verified and MLE-bench.
Why it matters: First paper to publicly characterize what "training for hours-long trajectories" actually requires at the data and curriculum level — not just longer context, but a different SFT recipe and a staged RL schedule.
arxiv.org/abs/2602.17547
arXiv preprint 2025 Systems
Agent.xpu: Efficient Scheduling of Agentic LLM Workloads on Heterogeneous SoC
arXiv 2506.24045 (June 2025)
A systems paper, not an ML paper — and that's the point. Introduces a vocabulary for the workload pattern: reactive agents (respond to user turns, hard latency deadline) versus proactive agents ("ambient, digesting event streams in the background without hard deadlines"). Proposes a scheduler that co-locates reactive and proactive agents on the same SoC by treating proactive agents as preemptible background fillers — they consume idle GPU cycles when reactive load is low, and yield instantly when a user-facing call arrives. Reports 1.7-2.4× throughput improvement on a mixed reactive/proactive workload versus naive FIFO.
Why it matters: The first formal study of ambient agents as a distinct scheduling class. The reactive/proactive distinction is now standard vocabulary in production agent stacks (Anthropic's Cowork, OpenAI's Codex Cloud, LangChain's deep agents all use the framing).
arxiv.org/abs/2506.24045

03 — GitHub Pulse

The repos shipping the async agent stack

langchain-ai/deepagents ~22K ★
Python & TypeScript agent harness with planning tool, filesystem backend, sub-agent spawn. Version 0.5 (Apr 2026) added async sub-agents.
Reference implementation of the supervisor + bounded-state-return pattern.
langchain-ai/open-swe ~9.8K ★
Open-source async coding agent. Cloud-sandboxed (Daytona), Slack/Linear invocation, sends a PR when done.
The clearest open-source example of the "ticket → PR" async loop.
langchain-ai/agent-protocol actively maintained
Open spec for serving LLM agents. POST /runs, GET /runs/{id}, /cancel, /resume — the wire format under LangGraph Platform.
The closest thing the field has to an "HTTP for agents" — read once, learn once.
langchain-ai/agent-inbox ~1K ★
UI for human-in-the-loop interrupts. The "inbox" pattern Harrison Chase has been evangelizing — feed of agent runs awaiting your input.
Small repo, big idea — async agents need an inbox UI, not a chat UI.
karpathy/autoresearch ~66K ★
Karpathy's March 2026 demo of asynchronously collaborative research agents on single-GPU nanochat training. Reached 66K stars within a month of release.
A working sketch of "research community of agents" — see Section 4.
ComposioHQ/agent-orchestrator actively maintained
Agent-agnostic orchestrator — plans tasks, spawns parallel coding agents (Claude Code, Codex, Aider), handles CI fixes and merge conflicts.
Useful when you want to fan out work to multiple coding agents from one queue.

04 — Community Pulse

What practitioners are actually saying

Andrej Karpathy · X, March 2026
Karpathy has argued that the next phase of agent work has to be asynchronously massively collaborative — drawing the analogy to SETI@home — and that the goal is not to emulate a single PhD student but a research community of them. He shipped karpathy/autoresearch as a working sketch of this idea (~66K stars within a month).
Implication: solo-agent benchmarks (one Devin, one Cursor) are starting to feel like the wrong unit of measurement. The product surface is becoming "how many agents can one human direct in parallel?" — Karpathy himself has said his ratio flipped from writing 80% of code to ~20%, with the rest delegated.
Harrison Chase · Sequoia "Training Data" podcast, early 2026
Chase distinguishes ambient from autonomous. Ambient agents run in the background reacting to event streams (new email, new PR, new ticket) but still surface decisions to a human inbox; they are not unattended. He has explicitly said "ambient does not mean fully autonomous."
Source: Sequoia "Ambient Agents and the Agent Inbox" episode. The distinction matters for product positioning — selling "agents that ping you" is far easier than selling "agents that act without you."
Simon Willison · simonw.substack.com, May 2026
Willison has been documenting a personal workflow he calls code research projects with async coding agents — pick a research question, spin up Claude Code or Codex, let it run experiments unattended, come back to a written report. His public simonw/research repo accumulated 13 separate research projects in two weeks, "averaging nearly one a day."
This is the practitioner-side story behind the architectural shift: when async actually works, it's normal to have 5-10 agent runs in flight at any moment. The bottleneck moves from "thinking hard" to "framing good questions."
Cognition (Devin team) · cognition.ai blog, 2026
Cognition has framed Devin as "an async autonomous agent that takes a ticket and delivers a PR hours later" and explicitly named the productivity dip the async valley of death — the awkward 3-15 minute window where a run is too long to wait for and too short to context-switch.
The 2026 Devin 2.2 release leaned hard into making the start/end notifications the primary UX, with the "watching it work" view demoted to a debug surface. The architectural lesson: async UX is the product.

05 — Platform Deep-Dive

How the four big platforms implement async today

Claude
Anthropic · Cowork + Claude Code + Chrome
Cowork mode (research preview) — desktop app for non-developers to run agents over their files in the background. Includes a first-class scheduled tasks primitive: a SKILL.md-style script that runs on demand or on an interval, returning a notification when complete (this very lesson is generated by one). Claude Code background runs let you fork a run into a sandboxed worktree and resume later. Claude in Chrome can be left to drive a tab while you switch windows. The persistence layer under all three is the same checkpoint store; the cap on long runs is currently set by context-engineering rather than infra.
Codex / GPT-5.4
OpenAI · Codex Cloud
Codex Cloud is OpenAI's flagship async surface — submit a task from web, mobile, or CLI, and an isolated cloud sandbox executes it. The May 2026 Codex CLI 0.128 added a /goal command that loops until either the goal is verified complete or a token budget is exhausted — an explicit "spend N tokens trying" knob. Subagents let a Codex run spawn specialized children in parallel and collect their results. Mobile push notifications mean a run started on desktop can be reviewed on the phone — the canonical "delegated colleague" UX.
Gemini 3.1
Google · Gemini Deep Research + Workspace
Gemini's async strategy leans on its 2M-token context window — many "long" tasks can be done in a single non-streaming call and then surfaced into Gmail/Docs/Drive. Deep Research is the headline async product (5-15 minute runs). Where Gemini differs from the others: tighter Workspace integration means the output of an async run is more often a Doc/Sheet/Slide than a chat reply, which dovetails with Google's "agent does the work directly in the artifact" framing.
OpenClaw
Open-source · SKILL.md hub-and-spoke
OpenClaw treats async as a first-class file-system primitive: a SKILL.md in a watched directory becomes a runnable async job, with the hub-and-spoke architecture (Day 14) keeping each spoke's working set small. Schedules are cron-like JSON files; runs write back into the workspace folder, which the user opens later. The downside is the operational story — there is no managed service; you are running it on your own machine, so persistence and recovery are your problem.

06 — Vocabulary

Terms to use precisely

Run运行
A single async invocation of an agent against a thread. Has its own run_id, status (pending/running/interrupted/completed/failed), and trajectory.
Trap: do not say "session" — sessions can contain multiple runs, and "session" implies a user is attached.
"Kick off three runs against thread thr_47 in parallel and pick the best."
Thread线程
The persistent conversation/state container an agent run executes against. Threads survive across runs and processes; runs do not.
Trap: do not equate with "conversation" — a thread is the durable state object, not the message history.
"Resume the thread from checkpoint step_84."
Ambient agent环境智能体
An always-on agent listening to event streams (email, webhook, file change) that surfaces decisions to a human inbox. Not autonomous — humans review, but the agent initiates.
Trap: ambient ≠ autonomous. Conflating them is the fastest way to oversell.
"The ambient PR-review agent flagged this diff at 3am."
Agent inbox智能体收件箱
A UI/notification surface where async agents queue up items needing human input — approve / reject / answer-question / accept-PR. Replaces the chat thread as the primary touchpoint.
Trap: not a chat history viewer; inbox items are actionable.
"Three items in the inbox — review the migration PR first."
Async valley of death异步死亡谷
Cognition's term for the productivity dip in the 3-15 minute run-length window — too long to wait, too short to context-switch.
Trap: do not use as a brag — it's a UX problem, not a feature.
"Our P50 is 7 minutes — we're sitting in the valley."
Checkpoint检查点
A serialized snapshot of agent state (messages, scratch memory, sub-agent handles) written after each step, keyed by (thread_id, step). Enables resume, fork, and replay.
Trap: not the same as "context window" — checkpoint is the durable record, context is what's loaded for the next LLM call.
"Fork from the step-30 checkpoint and try a different plan."
Trajectory splitting轨迹切分
SFT recipe (KLong, 2026) that breaks a million-token trajectory into overlapping chunks for training, preserving early context and progressively truncating the middle.
Trap: not the same as "chunking" for retrieval — splitting is for training data preparation.
"We trajectory-split the 4-hour Claude trajectories before SFT."
Reactive vs Proactive响应式 / 主动式
Agent.xpu's scheduler classification. Reactive = user-facing, hard latency deadline. Proactive = ambient, no deadline, preemptible. Production stacks colocate them.
Trap: do not equate proactive with "fully autonomous" — proactive just means no waiting user.
"Proactive backfill jobs run on idle GPU; reactive chat preempts them."
Interrupt中断
A point in agent execution where the run pauses and emits an event awaiting human input (typically via the inbox). Run resumes from that step on receipt of input.
Trap: distinct from "cancel" (which terminates) and "tool call" (which is internal).
"The agent hit an interrupt asking to confirm the deletion."
Sandbox沙箱
An isolated cloud environment (shell, browser, filesystem) given to one async run. Per-run isolation prevents cross-run contamination and limits blast radius if the agent is prompt-injected.
Trap: a "sandbox" with shared state across runs is not a sandbox.
"Each Open SWE run gets its own Daytona sandbox."
Subagent (async)异步子代理
A child agent spawned by a supervisor that runs in the background, returning a task ID immediately. The supervisor continues working and polls or waits for completion.
Trap: distinct from inline sub-agents which block the parent until they return.
"Spawn three async subagents and collect via list_async_tasks."
Webhook / Trigger回调 / 触发器
External event sources (GitHub PR, Linear ticket, inbound email, cron) that initiate an agent run without a human typing into a chat box.
Trap: triggers are how ambient agents start; not all async agents are ambient (a user-initiated long run is async but not ambient).
"On-PR-opened trigger spawns the review agent."

07 — Expert Questions

Questions that signal you've actually thought about this

Q1
"What's your strategy for compound error in trajectories longer than the model's context window — verifier sub-agents, periodic re-grounding from the original spec, or process reward models on intermediate steps?"
Reveals whether you understand that the failure mode of long async runs is not the model getting dumber but early small mistakes propagating. Names the three serious mitigations.
Q2
"How are you keying your checkpoint store — by (thread_id, step) or by content hash? The latter lets you fork cheaply but breaks linear resume semantics."
A specific implementation question that maps to a real architectural trade-off. Anyone who has built one of these systems will have an opinion. Anyone who hasn't will dodge.
Q3
"What's your reactive-vs-proactive scheduling story when both share GPU? Naive FIFO destroys reactive p99 latency the moment a long proactive run lands."
Cites the Agent.xpu observation directly. Distinguishes you from people who think async = "just wait longer." This is the question Anthropic and OpenAI infra teams actually argue about internally.
Q4
"Did you measure the async valley of death on your product? What's your P50 run-length, and how aggressively do you push runs past 15 minutes vs. shrinking them under 30 seconds?"
Forces a numbers-based answer about UX positioning. Most teams have a P50 run length but have never thought of it as a UX choice.
Q5
"Are you using the LangChain Agent Protocol for runs/threads, or have you rolled your own? If your own, how does that interact with multi-tenant deployment of third-party agents — every wire format becomes its own platform."
Surfaces whether they've thought about the strategic question of agent interop. The honest answer is usually "we rolled our own and we'll probably regret it" — exactly the conversation worth having.

08 — CGO Lens

What this means for botlearn.ai

Three product/GTM takeaways:

AThe buyer is no longer the chatbot user

Sync chat sells to "I want answers faster." Async agents sell to "I want my evenings back." Those are different economic buyers, with different ROI math. For botlearn.ai's enterprise pitch, the right framing isn't "Claude/GPT can answer your team's questions" — it's "Claude can run unsupervised against your training program overnight and hand your L&D lead an inbox of 8 things to review by 9am." The unit being sold is delegated time, not response speed.

BInbox UX is a moat

Anyone can wrap a sync chat against a fine-tuned model. Almost nobody has shipped a credible inbox for agent work that fits an enterprise's existing review/approval flows. If botlearn.ai builds an inbox where managers triage agent-produced course outlines, learning paths, and assessment drafts, the surface itself becomes the product — and switching cost goes up sharply once managers' review muscle memory is calibrated to that inbox.

CThe pricing primitive shifts to "agent-hours"

Sync chat naturally meters per token. Async agents naturally meter per run or per agent-hour — which, helpfully, is much closer to how enterprise buyers think about contractor or BPO spend. Replacing "0.5 cents per 1K tokens" with "$8 per agent-hour, capped" is dramatically easier to explain in a procurement meeting. For botlearn.ai's commercial motion, picking the right pricing primitive early is one of the few decisions that compounds.

Three-week conversation prep: when an Anthropic or OpenAI founder asks what you find most interesting in agents this quarter, "the architectural shift to async — and that the inbox UX is now where the differentiation lives, not the model" is a substantive answer that signals you've followed the actual product evolution, not just the benchmark headlines.

09 — Curriculum Tracker

Where Day 25 sits in the journey

D01Full Agent Stack
D02Memory Architecture
D03Planning & Tool Use
D04RAG Deep Dive
D05Agent Frameworks
D06Benchmarks & Eval
D07Multi-Agent Systems
D08Computer Use Agents
D09Code Agents
D10Long-Horizon Tasks
D11Agent Safety
D12Agent Economics
D13Research Frontiers
D14OpenClaw Deep-Dive
D15A2A Protocols
D16Agentic Commerce
D17Synthesis
D18Reasoning & TTC
D19Agent Observability
D20Voice & Realtime
D21Agent RL & Fine-tune
D22Context Engineering
D23Open-Weight Models
D24Deep Research
D25Async Agents (today)