# Data plane v2: implementation progress

Overview and design: [Cells: 75,000 agents in parallel](https://stend.sh/s/MZJtcWpUO7YRKN1Wm-67rw/). This page is the detailed step log.

Updated 2026-11-17, 10:55 am CT. **Step 11 is under way: session files (11.1), MCP servers with their OAuth tokens (11.2), sandboxes (11.3), schedules, triggers, long tool calls and subagents (11.4), and Slack and channels, observers, trace exports and an opt-in warehouse export (11.5) run on v2. Reports are deprecated and get nothing from v2. Next: one test org fully on v2 next to production (11.6).** **Step 11's goal: a full org working end to end on v2, then 75 000 agents that use files, MCP, sandboxes, schedules and subagents. That result decides between full v2, keeping v1, or a hybrid.** **Step 10 is done: 72 000 agents on EKS with a cell node and a quarter of the executors killed mid-run finish with 0 errors at ~200 turns/s, and the killed node now rejoins in about 3 minutes without running out of memory (run 13). The overload run passed too (run 12: 0 errors, no out-of-memory kills, refusals stopped once arrivals did). Bucket protection and a cross-region restore drill move to step 11, before the first production v2 org.** Step 9 is merged ([#5375](https://github.com/everruns/everruns/pull/5375)): a cell that loses every node comes back from the object store, as of its newest state or a moment before. In the full-size drill (75 000 sessions, 37 534 in the lost cell), the rebuild took 3.7 s (budget 10 min), shipping lag p99 was at most 1.5 s (budget 2 s), and no tool ran twice.** Step 8 is merged ([#5364](https://github.com/everruns/everruns/pull/5364)): a v2 org's chat runs on its data plane end to end, behind the same URL the console and the CLI already use. A live reply chunk reaches the browser with p99 69 ms (budget 100 ms), and the edge adds p99 under 1 ms (budget 5 ms). Verified in a real browser (streaming, Stop, approvals), with the CLI, and with a real model.** Step 7 is merged ([#5361](https://github.com/everruns/everruns/pull/5361)): the server is now the control plane for v2 orgs. An edit reaches the data plane with p99 9.4 ms (budget 1 s), the feed arrives with p99 199 ms (budget 2 s), and allowances never overspent under concurrent retried requests.** Step 6 is merged ([#5356](https://github.com/everruns/everruns/pull/5356)): one cell with separate executors, the control plane protocol against a fake control plane, and the failure suite all pass; a chat turn costs the cell's leader 2.75 ms of CPU and waits for 5 round trips, both within budget.** Step 5 is merged; step 4's live check passed in prod after today's release. Design: [knowledge/execution/data-plane-v2/design.md](https://github.com/everruns/everruns/blob/main/knowledge/execution/data-plane-v2/design.md). Every step has a bench gate; a step is done when its gate holds.

## Plan

| # | Step | Status |
|---|---|---|
| 0 | Bench first, core protocols on paper | ✅ Done ([#5282](https://github.com/everruns/everruns/pull/5282)) |
| 1 | Engine hooks | ✅ Done ([#5283](https://github.com/everruns/everruns/pull/5283)) |
| 2 | Trusted host extensions | ✅ Done ([#5294](https://github.com/everruns/everruns/pull/5294)) |
| 3 | Agent definitions as data | ✅ Done ([#5296](https://github.com/everruns/everruns/pull/5296)) |
| 4 | Workers on the Engine (PostgreSQL hosting) | ✅ In prod ([#5320](https://github.com/everruns/everruns/pull/5320)); live check passed after the Nov 11 release; some features still worker-host only |
| 5 | `crates/cell` + testkit (port funout, TLA+ models, simulation) | ✅ Done ([#5341](https://github.com/everruns/everruns/pull/5341)) |
| 6 | One thin, complete cell deployment | ✅ Done ([#5356](https://github.com/everruns/everruns/pull/5356)) |
| 7 | Control-plane contract | ✅ Done ([#5361](https://github.com/everruns/everruns/pull/5361)) |
| 8 | Gateway, edge router, live streaming, local full v2 | ✅ Done ([#5364](https://github.com/everruns/everruns/pull/5364)) |
| 9 | Disaster recovery | ✅ Done ([#5375](https://github.com/everruns/everruns/pull/5375)) |
| 10 | Prove on EKS (75k agents) + operations | ✅ Done: 72k chaos, overload and rejoin all clean on EKS; bucket protection moved to step 11 |
| 11 | Full org on v2: every feature on cells, one org end to end, 75k agents with the feature mix, then a decision brief (full v2, keep v1, or hybrid) | 🔵 In progress: 11.1 to 11.5 merged, 11.6 next |
| 12 | Finalization after the decision: moving orgs to v2, v2 as the default, self-hosted upgrade, production rollout, metrics and alerts, documentation, v1 retirement | ⚪ After the decision |

## Step 11: A full org on v2

Goal (Nov 17): a full org working end to end on v2, and 75 000 agents using its features. With both in hand comes the decision: everything on v2, keep v1, or a hybrid. Step 12 is the finalization after that decision: moving orgs to v2 with a per-org move command and rollback window, v2 as the default for new orgs, the self-hosted upgrade (Helm, Docker Compose, upgrade guide), production rollout with bucket protection and a cross-region drill, dashboards and alerts with runbooks, public documentation, and retiring v1. Plan approved Nov 17. One PR per sub-step, each with its own bench line.

| # | Sub-step | Gate | Status |
|---|---|---|---|
| 11.1 | Session files: `/fs` routes, uploads, downloads, starter files, chunk cache | Upload/download p99 < 200 ms up to 1 MB; ≤ 1 commit per turn; no lost write under chaos | ✅ merged everruns#5461 (Nov 17): upload p99 40–53 ms, download p99 25–44 ms up to 1 MiB; 22 369 uploads under leader and follower kill -9, none lost |
| 11.2 | MCP servers and per-session overrides, OAuth tokens refreshed by the data plane | MCP call overhead p99 < 20 ms; a refreshed token used across executors | ✅ merged everruns#5465 (Nov 17): credentials opened 3.6 / 4.1 ms p50 / p99, kept 7 / 21 µs; 4 executors on one expired grant refresh it once; a person's own grants and session overrides go with 11.6 |
| 11.3 | Sandboxes: records in cell state, workspace sync, egress through the proxy | Start within 10% of v1; unchanged sync < 50 ms; no orphaned sandbox | ✅ merged everruns#5466 (Nov 17): start +6.2% of provider time vs v1; unchanged 1000-file sync 1.3 ms before a call, 17.9 ms after; an orphan from a killed executor is removed before the next create |
| 11.4 | Schedules and triggers, detached tool calls, agents using agents | 10 000 schedules fire within 1 s, also across a leader change; detached calls survive an executor kill; a subagent on another cell answers its parent | ✅ merged everruns#5467 (Nov 17): 10 000 schedules fire at most 121 ms late; a crash-driven leader change costs ~5 s of election (openraft has no leader hand-over yet; goes to the decision brief); a detached call resumes after its executor is killed; a subagent on the other cell answers inline and in the background; agent triggers admit their runs on v2 |
| 11.5 | Integrations: Slack and channels, observers and evals, trace and analytics export | Slack reply p99 < 5 s; trace export < 2 min; observers see each turn once | ✅ merged everruns#5469 (Nov 17): channel reply p50 334 ms, p99 721 ms; a tapped event reaches the control plane p99 468 ms; all 400 turns seen exactly once across a leader kill. Reports deprecated (no v2 data); analytics through an opt-in per-org warehouse export (hourly gzipped NDJSON in object storage). Attachments and reactions go with 11.6 |
| 11.6 | One test org fully on a v2 data plane next to production: console, CLI, Slack, real models | Every page and command it uses works, with no 501 or hidden feature | ⚪ |
| 11.7 | 75 000 agents with the feature mix (files, MCP, schedules, subagents, some sandboxes) | ~72 000 agents with chaos: 0 errors, no out-of-memory kills, cost and CPU recorded | ⚪ |

## Step 10: Prove on EKS

A full fleet on the production cluster, isolated from the app: 3 cells × 3 nodes, 8 executors and 3 drivers on one 48 vCPU machine in its own node pool (back to zero after each run), simulated models, a separate bucket. No Everruns org, user or key is involved.

### Runs

| Run | Date | Turns | Errors | Turns/s | What it found |
|---|---|---|---|---|---|
| 6 | Nov 15 | 723 110 | 0 | 199 | Baseline; the killed node ran out of memory 5 times while catching up |
| 8 | Nov 15 | | | | Saturated host: cells stopped committing ~20 min, 3 nodes out of memory. Fixed by Raft on its own listener and shedding a stalled leader ([#5440](https://github.com/everruns/everruns/pull/5440)) |
| 9 | Nov 16 | 655 200 | 6 790 | 123 | A killed follower never caught up (2 MB request limit on snapshots). Fixed: limit lifted, a far-behind follower steps aside ([#5447](https://github.com/everruns/everruns/pull/5447)) |
| 10 | Nov 16 | 409 900 | 31 399 | 69 | Rejoin fixed. New: S3 uploads went through a small NAT that ran out of burst; shipping fell behind and every cell stopped taking work. Fixed: S3 gateway endpoint (saas, Nov 16 release) and only leaders upload snapshots ([#5448](https://github.com/everruns/everruns/pull/5448)) |
| 11 | Nov 16 | **720 770** | **0** | **207.6** | Clean. Worst shipping lag 2.7 s (bound 5 s), no S3 timeouts. Killed node back within ~10 min, but ran out of memory 5 times on the way. Fixed: the commit index is kept on disk, so a restarted node replays its log in small chunks ([#5455](https://github.com/everruns/everruns/pull/5455); local repro 2.9 → 2.1 GB, below the leader) |
| 13 | Nov 16 | **720 990** | **0** | 202.4 | Chaos with the rejoin fix: no out-of-memory kills. The killed node was back ~70 s after the kill and caught up 2 min later at 2.7 GB (run 11: killed 5 times, ~10 min). First CPU and memory record: cells 12.5 cores average (18.4 peak), executors 18.5 (27.2), drivers 0.6; the machine 69% average, 96% peak, 118 of 189 GB at peak |
| 12 | Nov 16 | **716 700** | **0** | 189.6 | Overload: bursts of 30 000 new agents, 2 KB messages, up to 46 563 inputs queued. No restarts, no out-of-memory kills; 1 893 requests refused for memory, all retried and done; no refusals after the last burst while the queue drained to 0. Turn p99 580 s (queueing) |

### Gate

- [x] ~72 000 agents with chaos (a cell node and a quarter of the executors killed): 0 errors
- [x] Compute per agent-hour: **$3.3e-05** (estimate, $0.05 per vCPU-hour)
- [x] Overload past memory capacity (bursts of 30 000 at once, 2 KB messages): no out-of-memory kills, 0 errors, shedding stops once arrivals stop (run 12)
- [x] A killed node rejoins without running out of memory ([#5455](https://github.com/everruns/everruns/pull/5455); run 13: back in ~70 s, caught up 2 min later at 2.7 GB)
- [x] Load runs record CPU and memory of every pod and the machine (run 13)
- [x] Bucket protection (versioning, object lock, replication) and a cross-region restore drill: moved to step 11, before the first production v2 org (decision Nov 17: object lock cannot be turned off, so it goes on the production bucket, not the 14-day load bucket)

## Step 9: Disaster recovery

A cell that loses every node at once (two zones, correlated disks) is rebuilt from its last snapshot in the object store plus the log its leader shipped since. One org can be taken back to a moment without touching any other org. One PR: [#5375](https://github.com/everruns/everruns/pull/5375).

### Gate

Measured with the full-size drill: 2 cells on one machine, 75 000 sessions, every node of one cell killed with `kill -9` while 3 000 sessions were mid-turn.

- [x] Rebuild of a full cell (37 534 sessions): **3.7 s** (budget 10 min); a leader again 7.4 s after the kill
- [x] Shipping lag p99 **at most 1.5 s** (budget 2 s)
- [x] Ship-first cost p50 **at most 10 ms**, p99 **at most 100 ms** (budget 100 ms). The first run measured 100 to 250 ms; writers waiting together now share one write
- [x] No tool ran twice: 6 187 tool calls started, 6 182 ran; the 5 whose outcome was lost are reported unknown, not run again
- [x] Nothing acknowledged and shipped is lost: every session finished, and every message completed once. 18 messages fell inside the stated loss window and were sent again
- [x] A one-org restore leaves every other org untouched (test)

### Work items

- [x] Rebuild a cell, latest or point in time; a new incarnation number, and every running claim fenced off
- [x] One-org restore in place, on a new history branch per session (found: keying history by cell broke as soon as a restored session moved)
- [x] Ship before answering: tools not safe to repeat, session creates, every move step
- [x] Restore points: a snapshot at least every 15 minutes, a 7-day window, hourly cleanup
- [x] Control plane rollback: leftovers reported, then kept or dropped per org (`everruns-dataplane reconcile`)
- [x] Point-in-time placement of steps without a time (found by the one-org test: a later move slipped in)
- [x] Weekly drill workflow in CI (2 000 sessions)
- [x] CI green, merged (1:10 pm CT, Nov 12)
- [ ] Step 10: bucket protection (versioning, object lock, replication), and a quarterly drill that restores a copy of production into a second region

## Step 8: v2 sessions end to end

A v2 org's sessions run on its data plane, behind the URL the console and the CLI already use. The control plane keeps every session's record, and the cells run the turns. Stage 1 is chat: files, MCP and sandboxes are hidden for a v2 org. One PR: [#5364](https://github.com/everruns/everruns/pull/5364).

### Gate

- [x] Live reply chunks with 200 sessions streaming at once: p50 **3.8 ms**, p99 **69 ms** from the executor to the browser connection (budget 100 ms); the first chunk of an answer p99 **25 ms**
- [x] Edge hop: p50 **0.1 ms**, p99 **under 1 ms** (budget 5 ms)
- [x] A 30 s token stops working when it ends, and a token of another org reaches nothing
- [x] Control plane down: running sessions keep chatting; new sessions wait for it to come back
- [x] A config change mid-turn leaves the running turn alone; the next turn takes it
- [x] Real-server fleet: the API server as control plane, three nodes, an executor and the edge (found eight bugs the fake control plane hid, all fixed)
- [x] The console in a real browser: create an agent, chat with streaming, Stop, and "Allow once" on an approval (found two more bugs, fixed)
- [x] The CLI: create a session, chat with streaming, list sessions
- [x] A real model (Muse through an org's own OpenRouter key; the key reached the data plane sealed)

### Work items

- [x] Edge router as a mode of the cell binary, exchanging the caller's credential for an org token
- [x] The control plane creates the session on the data plane under the same id; a refused create fails the request
- [x] Org model providers as sealed connections, opened only by the executor running the turn
- [x] Tool approvals park and resume turns; "ask before acting" works on cells, and the Framework refuses an agent that would let marked tools run unasked
- [x] CLI commands translated at the edge, so the CLI needs no change
- [x] Live streaming through stream nodes (found: every answer lost its first chunk)
- [x] Local full v2 stack: `DATA_PLANE=v2 just start-all`, `just dp-enable <org>`
- [x] CI green, merged (2:45 am CT, Nov 12)
- [ ] Follow-ups: a create-then-message race seen once in a test, a session left half-placed makes each call wait 30 s, the console's "Test in Playground" Start button (console bug)

## Step 7: Control-plane contract

The real server serves the control plane side of `/dp/v1` for orgs on a v2 data plane, and the cells serve the rest. Orgs with no data plane (all of them today) are unchanged. One PR: [#5361](https://github.com/everruns/everruns/pull/5361).

### Gate

- [x] Config propagation: p50 **4.7 ms**, p99 **9.4 ms** from an edit to the data plane (budget 1 s; 40 edits through PostgreSQL `NOTIFY`)
- [x] Feed lag: p50 **117 ms**, p99 **199 ms** from a cell commit to the control plane (budget 2 s; small two-cell run)
- [x] Allowances never overspend: 8 cells × 12 requests at once, every request sent twice, against a $1 policy; what could be spent stays under the cap, also after the feed charges it
- [x] Cell conformance and failure suites green against the fake control plane; server side tested on a real database against a stub data plane
- [x] A cell fleet driven by the real server (done in step 8)

### Work items

- [x] Config outbox: state-based, ordered per org, coalesced full snapshots, `NOTIFY` plus 1 s poll
- [x] Sealed secrets and connections: per-org data key, AES-256-GCM bound to org, item and revision; only executors unseal
- [x] Feed into the usage journal (once per provider attempt), session summaries, org events; feed archive and replay in cells
- [x] Grant ledger reserved against usage policies, cumulative settlements, idempotent answers
- [x] Org tokens (EdDSA, 10 min), JWKS, `POST /v1/auth/token`; gateways check them and keep orgs apart
- [x] Org admin (enable, suspend, resume, export, delete) behind the link token
- [x] Operator CLI `everruns-dataplane`: register, enable, suspend, resume, secret, status, diff, bump-epoch
- [x] Data keys and the token signing key in encrypted columns covered by secrets key rotation (found by CI's encrypted-columns check)
- [x] CI green, merged (3:59 pm CT, Nov 11)
- [ ] Later: mTLS and KMS for the link (step 10)

## Step 6: One thin, complete cell

A cell as deployed: three state nodes, executors as separate processes that pull turns with credits, a durable workspace per session, and the control plane protocol (`/dp/v1`) against a fake control plane. One PR: [#5356](https://github.com/everruns/everruns/pull/5356).

### Gate

- [x] Level 2 green: cells with real executors (Engine, simulated models, fake control plane), hosting conformance through an executor's link, chaos with node and executor kills plus live moves (200 sessions, 8 node kills, 10 executor kills, 17 moves, 0 failed sessions, no tool ran without its durable start)
- [x] Failure suite green: lost acknowledgements, control plane down, control plane restored to an older epoch, expired grants, exhausted budget, feed delayed across a leader change, stale executor, late messages of earlier moves, whole cell restarted after a tool's external effect
- [x] Leader CPU per chat turn: **2.75 ms** (budget 8.7 ms, one core at 115 turns/s); tool turns 4.6 ms
- [x] Round trips a chat turn waits for: **5.0** (budget 5; was 11.3 before the cell used Engine's shortcuts), 380 turns/s, p99 under 1 s

### Work items

- [x] Executors outside the cell, with a mirror and fenced writes
- [x] Durable workspace per session (found: writes were denied, and a shared workspace hid other sessions' files)
- [x] Control plane link: agents as ordered config, allowances asked by the leader, usage and session summaries on an acknowledged feed
- [x] Fake control plane with fault knobs, and the failure suite against a live fleet (found: an executor kept a moved session's old position, so a session moved back stalled)
- [x] Bench script with budgets; pushed inbox and receipts riding on lease writes cut waited round trips from 11.3 to 5
- [x] CI green, merged (11:27 am CT, Nov 11)
- [ ] Follow-ups: executor long-polls also wake on their own writes (~9 reads per turn); reserve for several model calls at once (step 7)

## Step 5: Cells

funout's cell ported onto the Engine (`crates/cell`, unpublished): own Raft log, sessions placed per cell, live moves, spend allowances, log shipping to object storage. One PR: [#5341](https://github.com/everruns/everruns/pull/5341).

### Gate

- [x] 75 000 simulated agents (2 cells × 3 nodes, one machine): 150 000 turns, 0 errors, 240 turns/s, every session read back and checked; node memory median 1.1 GB
- [x] Long session flat: 40 × 5 000 = 200 000 turns at 204 turns/s, median turn per tenth within 9% after the first
- [x] Chaos invariants: `kill -9` of leaders and followers with live moves, 0 failed sessions, no tool run without its durable start
- [x] Simulation seeds clean: protocol simulation (40 seeds, each replayed and compared), Raft cell simulation, log crash tests

### Work items

- [x] Storage proof: log crash tests (found and fixed a data-loss window), Raft simulation, openraft storage suite
- [x] TLA+ models: epochs and fencing, placement generations, spend grants
- [x] Placement generations on moves; restore a lost cell from archived snapshot plus shipped log
- [x] Spend allowances through the Engine budget gate, failing closed; no platform ids in the agent model
- [x] Protocol simulation: found three move races and a spend leak, all fixed
- [x] Scale fixes: a lagging follower now heals the cell (9.9 s at 42 000 sessions; before, never); no idle snapshots; node memory 1.8 → 1.2 GB idle
- [x] CI green, merged (1:32 am CT, Nov 11)
- [ ] Follow-ups: serve the kept log from disk, bit-for-bit node replay, PostgreSQL progress record

## Step 4: Workers on the Engine

Platform agents compile to one id-free declaration the Engine runs; no platform id enters the Framework model. A session runs on the Engine when its organization has the `engine_hosting` switch on and its agent compiles; everything else stays on the worker host.

- [x] Platform agents compiled to declarations, published as revisions; an edit applies at the session's next turn
- [x] Sessions bind and run on the Engine over the existing session leases
- [x] Models through the organization's providers; platform capabilities per agent
- [x] Session files in the session's own platform workspace (verified: the agent's file shows in the platform files API)
- [x] Events name the platform agent and harness
- [x] Budgets, payment, outbound network, utility model, hosted MCP, knowledge, sandboxes, platform tools
- [x] Verified end to end locally; CI green, merged (2:07 am CT)
- [ ] Still on the worker host only: long tool calls handed off, tool approvals and sign-in prompts, subagents, MCP credentials, who the turn acts for
- [x] In prod (release of Nov 10, 11:40 pm CT)
- [x] First live check (Engine hosting on for one test org): a session whose agent has read-only starter files never started; every activation failed copying them in again and retried silently. Fix merged in [#5341](https://github.com/everruns/everruns/pull/5341): the control plane already copies starter files, so the Engine no longer does. Chaos agents now carry a read-only file.
- [x] Live check after the Nov 11 release (fix included): the same agent with read-only files, in a dedicated test org, finished its turn in about 10 s and read its handbook files (8k bench waits until prod infrastructure is scaled back up)
- [ ] A start that keeps failing should show as a failed turn, not retry silently
- [ ] Later PR: remove the old worker host path

## Architecture review of steps 1 to 3

A review of the merged code for soundness, interfaces and dependencies. Nothing reviewed runs in production yet. Corrections: [#5303](https://github.com/everruns/everruns/pull/5303).

- [x] An agent edit that adds the agent's first file no longer suspends its sessions, and a session keeps its files across edits
- [x] An executor that cannot build an agent revision hands the session to one that can
- [x] A small agent cache under many concurrent agents can no longer suspend a session
- [x] Agent definitions are their own interface, with one rule for moving a session to a new revision and shared tests for every session store
- [x] Team members follow their lead's revision
- [x] One typed table says when each event must be stored
- [x] Cell storage options compared in the design (own Raft and log, PostgreSQL per cell, object storage, an existing replicated store)
- [x] CI green, merged (3:50 pm CT)
- [x] Decision: cells keep their own Raft storage, no central or per-cell PostgreSQL; the cell port (step 5) starts by proving it (formal model, deterministic simulation, kill tests)
- [x] No crate move needed for step 4: the worker already depends on the facade crate

## Step 3: Agent definitions as data

Agents can be stored as data the session authority keeps, one immutable revision per edit. The Engine builds the agent locally and caches it; an edit applies from the session's next turn.

- [x] Gate: building a definition takes 114 µs; a turn of a cached definition costs nothing measurable over a code-registered agent; uncached adds 138 µs
- [x] Memory and SQLite authorities keep definitions; an open turn keeps its revision (tests)
- [x] CI green, merged (2:10 pm CT)
- [ ] Carried into step 4: the server producing definitions from stored agents, and the platform's own agent builder

## Step 2: Trusted host extensions

A hosting profile can hand an Engine turn the platform services a worker turn already uses (budgets, payment, credentials, stores, hosted MCP, Knowledge context, tool detaching). An empty bundle changes nothing.

- [x] Gate: no slowdown (`long_session` 100 × 20: 432/444 turns/s before, 444/495 after), still 5.1 waited writes per turn
- [x] A budget authority stops an Engine-hosted turn before the model call (test)
- [x] CI green, merged (11:30 am CT)

## Step 1: Engine hooks

### Gate

- [x] Waited authority round trips per chat turn ≤ 5: **5** (was 22 writes)
- [x] Long sessions flat at 200 000 turns: p99 within 10%, throughput within 11% after first compactions (~1 000 turns/s; funout 120)
- [x] Memory per idle session within budget: **1.3 KB** (was 6.2 KB), budget 2 KB
- [x] No listener sees an uncommitted event (held and behind-the-work commits)
- [x] With steering, every provider call attempt settled exactly once (test: 12 inputs over 3 turns, each model call has exactly one `llm.generation`)
- [x] Every model call is in the log before it is sent, so an executor killed mid call leaves the call recorded (as unresolved, usage unknown); still 5 waited writes per turn

### Work items

- [x] Agent resolver for builds not registered at startup
- [x] Epoch hand-off (`SessionEpoch::hand_off`)
- [x] Long-session bench with waited writes per turn
- [x] Durable history floor for compaction
- [x] Committed event batches (5 waited writes per turn)
- [x] Typed history reads (no per-turn session scans)
- [x] Durable Object bridge fix (celld recovery test green)
- [x] Idle-session bench + bounded session cache (LRU)
- [x] Live token delta hook with epoch and stream fencing
- [x] Each turn keeps its agent build and runtime format
- [x] Each input keeps who it acts for (execution context)
- [x] Sessions needing newer protocol go to an executor that has it
- [x] Durable provider call attempts (recorded before dispatch)
- [x] CI green on the final commit (4ee73c3)
- [x] Merged (11:25 am CT)

## Step 1 numbers

| Measure | Before | After |
|---|---|---|
| Authority writes per chat turn | 22 | 9 (5 waited) |
| Turns/s, 10th tenth of a long run | 5.4 | ~1 000 (flat) |
| Engine memory per idle session | 6.2 KB | 1.3 KB |
