# Pi background-shell extensions: a measured comparison

Generated by `node bench/run-bench.ts`. Every call goes through a real Pi SDK
session with exactly one implementation loaded; model latency is excluded by
invoking the registered tools directly. The dev-server scenario crosses a real
turn boundary, driven by a scripted model, because the question there is what
happens at the boundary rather than inside one tool call.

Columns: `bash` = Pi built-in bash, `async-shell` = pi-async-shell, `bg-tasks` = pi-background-tasks@2.6.10, `better-bg` = pi-better-background-tasks@0.18.0, `pi-background` = pi-background@0.4.4, `patty` = pi-patty-bg-tasks@1.1.6, `pi-async` = pi-async@0.4.4, `pi-shell` = @tduyng/pi-shell@0.0.6, `shell-jobs` = pi-shell-jobs@0.1.2, `exec-cmd` = pi-exec-command@0.3.10.

## Environment

- date: `2026-11-25T09:28:36.073Z`
- node: `v26.13.1`
- sdk: `@earendil-works/pi-coding-agent@1.6.0, @earendil-works/pi-ai@1.6.0`
- pi: `1.6.0`
- shell: `/bin/sh`
- kernel: `Linux 7.3.5-2-cachyos`
- cpus: `28`
- loadAvg: `2.79 3.02 2.93`

## The field

| implementation | package | downloads/mo |
|---|---|---|
| `bash` | Pi built-in bash | — |
| `async-shell` | pi-async-shell | — |
| `bg-tasks` | pi-background-tasks@2.6.10 | 26,780 |
| `better-bg` | pi-better-background-tasks@0.18.0 | 6,581 |
| `pi-background` | pi-background@0.4.4 | 4,293 |
| `patty` | pi-patty-bg-tasks@1.1.6 | 2,476 |
| `pi-async` | pi-async@0.4.4 | 1,214 |
| `pi-shell` | @tduyng/pi-shell@0.0.6 | 1,100 |
| `shell-jobs` | pi-shell-jobs@0.1.2 | 766 |
| `exec-cmd` | pi-exec-command@0.3.10 | 186 |

Adoption is npm downloads in the last 30 days, measured when this benchmark was
written. It orders the columns and nothing else: a widely installed extension is
not thereby a good one.

## Capability matrix

| capability | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| In-turn await | no | yes | no | no | no | yes | yes | yes | yes | yes |
| Output-pattern wait | no | yes | no | no | no | no | no | no | no | no |
| Log search | no | yes | no | no | no | yes | no | no | no | no |
| stdin to a running command | no | yes | no | no | no | no | no | yes | yes | yes |
| PTY | no | yes | no | no | no | no | no | no | yes | yes |
| Rendered screen | no | yes | no | no | no | no | no | no | no | no |
| Cancel | no | yes | yes | yes | yes | yes | yes | yes | yes | no |
| Completion notification | no | yes | yes | yes | yes | yes | yes | no | no | no |

Each flag is backed by a registered tool, not by a README. A `no` means the
implementation has no tool that can do the thing at all.

## What a user gets

| outcome | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| A dev server started in one turn answers in the next | — | yes — 1 call(s) to know it is ready | yes — 8 call(s) to know it is ready | yes — 7 call(s) to know it is ready | yes — 8 call(s) to know it is ready | yes — 8 call(s) to know it is ready | yes — 8 call(s) to know it is ready | yes — 8 call(s) to know it is ready | yes — 1 call(s) to know it is ready | yes — 1 call(s) to know it is ready |
| A prompt after a 4000-line burst can be answered | — | yes — prompt answered | no — prompt visible, no stdin | no — prompt visible, no stdin | no — prompt visible, no stdin | no — prompt visible, no stdin | no — prompt visible, no stdin | yes — prompt answered | yes — prompt answered | yes — prompt answered |
| One 2.5 s command: time, context, calls to the answer | 2519.2 ms, 11913 B, 1 calls | 2555 ms, 677 B, 3 calls | 2523.7 ms, 12885 B, 3 calls | 2902 ms, 6460 B, 3 calls | 2517.7 ms, 573 B, 2 calls | 2509.8 ms, 342 B, 3 calls | 2507.6 ms, 17463 B, 2 calls | 2532.6 ms, 8572 B, 2 calls | 2507.8 ms, 12952 B, 2 calls | 2553.4 ms, 12316 B, 2 calls |
| Cancel a runaway: output kept, nothing left running | — | yes — log still readable | yes — log still readable | yes — log still readable | yes — log still readable | yes — log still readable | yes — log still readable | yes — log still readable | no — output lost after the cancel | no — no cancel tool |
| Output recovered after the agent is killed and restarted | — | yes — 40/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines | no — 0/40 lines |
| A task survives a hard parent exit | — | yes — 25/25 lines | no — 4/25 lines | no — 0/25 lines | no — 3/25 lines | yes — 25/25 lines | no — 0/25 lines | no — 3/25 lines | no — 6/25 lines | no — 0/25 lines |

## Mechanisms behind those outcomes

| claim | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| An in-turn causal barrier exists | yes | yes | no | no | no | yes | yes | yes | yes | yes |
| A 30 MiB log does not kill the process | yes | yes | no | yes | yes | yes | no | yes | yes | yes |
| One line in a 200k-line log is reachable | no | yes | no | no | no | yes | no | no | no | no |
| Three parallel commands overlap | — | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| A completion notification exists | — | yes | yes | yes | yes | yes | yes | — | — | — |

## Measurements

### What a user gets

#### A dev server started in one turn, used in the next

*Start a slow service, wait only until it can be called, then come back to it after the turn ends.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| readyMs | 1297.6 | 1412.1 | 1740 | 1404.3 | 1406.4 | 1407.4 | 1423 | 5258 | 30267.7 |
| readyCalls | 1 | 8 | 7 | 8 | 8 | 8 | 8 | 1 | 1 |
| ready | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| servedAtReady | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| turnBoundary | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| listedAfterTurn | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| reachableAfterTurn | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| logReadableAfterTurn | yes | yes | yes | yes | yes | yes | yes | yes | no |
| toolCalls | 5 | 12 | 11 | 12 | 12 | 12 | 12 | 5 | 5 |
| bytesIntoModel | 956 | 1681 | 3932 | 1997 | 766 | 2892 | 1317 | 2370 | 821 |

- `bash`: bash blocks until the server exits, so a long-lived service cannot be started at all
- `bg-tasks`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `better-bg`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `pi-background`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `patty`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `pi-async`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `pi-shell`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `shell-jobs`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms
- `exec-cmd`: no output-pattern wait: knowing the server is up costs one log poll per 200 ms

#### A command that prints 4000 lines, then asks a question

*Some commands print a lot and then wait for a human answer. Can the agent see the prompt and complete the interaction?*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| binding | pty | pipe | pipe | pipe | pipe | pipe | pipe | pty | pty |
| promptVisible | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| answered | yes | no | no | no | no | no | yes | yes | yes |
| answerLine | ANSWER[y] | ANSWER[] | ANSWER[] | ANSWER[] | ANSWER[] | ANSWER[] | ANSWER[y] | ANSWER[y] | ANSWER[y] |
| hung | no | no | no | no | no | no | no | no | no |
| wallMs | 373.3 | 26.6 | 854.1 | 21 | 427 | 23.3 | 281.6 | 5365.6 | 30356.1 |
| logBytes | 162922 | 158917 | — | 158917 | 158917 | 158917 | 158918 | 162922 | — |
| toolCalls | 5 | 3 | 3 | 3 | 3 | 3 | 6 | 5 | 5 |
| bytesIntoModel | 2546 | 9214 | 9818 | 66930 | 12265 | 17498 | 9029 | 52937 | 121343 |

- `bash`: bash blocks on the read and has no stdin channel, so the call never returns
- `bg-tasks`: no stdin channel: the prompt is visible in the log and cannot be answered
- `better-bg`: no stdin channel: the prompt is visible in the log and cannot be answered
- `pi-background`: no stdin channel: the prompt is visible in the log and cannot be answered
- `patty`: no stdin channel: the prompt is visible in the log and cannot be answered
- `pi-async`: no stdin channel: the prompt is visible in the log and cannot be answered

#### One 2.5 s command, 1000 lines of noise, one answer

*The ordinary case. What does a single slow command cost in wall-clock time, tool calls, and context before the agent can act?*

| metric | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| answerMs | 2519.2 | 2555 | 2523.7 | 2902 | 2517.7 | 2509.8 | 2507.6 | 2532.6 | 2507.8 | 2553.4 |
| answerFound | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |
| toolCalls | 1 | 3 | 3 | 3 | 2 | 3 | 2 | 2 | 2 | 2 |
| bytesIntoModel | 11913 | 677 | 12885 | 6460 | 573 | 342 | 17463 | 8572 | 12952 | 12316 |
| logBytes | — | 11913 | 11913 | — | 11913 | 11913 | — | 11913 | 11913 | — |

#### Cancel a runaway command, then look for leftovers

*When the agent stops a runaway build, the output should still be readable and no process should keep running.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| processesBefore | 3 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
| leakedAfter | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
| cancelMs | 77.1 | 8.9 | 196.7 | 0.2 | 0.2 | 17 | 0.1 | 0.9 | 0 |
| cancelSupported | yes | yes | yes | yes | yes | yes | yes | yes | no |
| outputPreserved | yes | yes | yes | yes | yes | yes | yes | no | yes |
| toolCalls | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
| bytesIntoModel | 700 | 938 | 2236 | 519 | 393 | 733 | 504 | 1292 | 8156 |

- `bash`: bash blocks until the command ends, so there is nothing to cancel
- `exec-cmd`: no cancel tool exists: the runaway cannot be stopped by the agent
- `exec-cmd`: 2 process(es) still carried the marker after the cancel; the bench killed them

#### Survive a hard parent exit (2.5 s writer)

*A job started in a turn should keep running after the process that started it is gone.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| survived | yes | no | no | no | yes | no | no | no | no |
| lines | 25 | 4 | 0 | 3 | 25 | 0 | 3 | 6 | 0 |
| expectedLines | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 |

- `bash`: bash cannot start a job that outlives the call
- `async-shell`: pi-async-shell wrote 25 of 25 lines after the process that started it exited
- `bg-tasks`: pi-background-tasks@2.6.10 wrote 4 of 25 lines after the process that started it exited
- `better-bg`: pi-better-background-tasks@0.18.0 wrote 0 of 25 lines after the process that started it exited
- `better-bg`: no log path is exposed; the surviving output was read from a fresh session
- `pi-background`: pi-background@0.4.4 wrote 3 of 25 lines after the process that started it exited
- `patty`: pi-patty-bg-tasks@1.1.6 wrote 25 of 25 lines after the process that started it exited
- `pi-async`: pi-async@0.4.4 wrote 0 of 25 lines after the process that started it exited
- `pi-async`: no log path is exposed; the surviving output was read from a fresh session
- `pi-async`: reading the surviving output failed: Error: Unknown task or name: 9407181b-161e-4118-aaa6-f4f733c5e5fa
- `pi-shell`: @tduyng/pi-shell@0.0.6 wrote 3 of 25 lines after the process that started it exited
- `shell-jobs`: pi-shell-jobs@0.1.2 wrote 6 of 25 lines after the process that started it exited
- `exec-cmd`: pi-exec-command@0.3.10 wrote 0 of 25 lines after the process that started it exited
- `exec-cmd`: no log path is exposed; the surviving output was read from a fresh session
- `exec-cmd`: reading the surviving output failed: Error: Unknown session id undefined

#### Kill the agent mid-job, restart, recover the output

*If Pi dies while a build runs, the next session should still find the build and the lines it printed.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| handleVisible | yes | no | no | no | no | no | no | yes | no |
| outputReadable | yes | no | no | no | no | no | no | no | no |
| lines | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| expectedLines | 40 | 40 | 40 | 40 | 40 | 40 | 40 | 40 | 40 |
| recovered | yes | no | no | no | no | no | no | no | no |
| toolCalls | 2 | 1 | 2 | 1 | 1 | 1 | 1 | 2 | 1 |
| bytesIntoModel | 895 | 49 | 288 | 19 | 18 | 2 | 1580 | 143 | 17 |

- `bash`: bash has no handle and no log: when Pi dies there is nothing to recover
- `bg-tasks`: the new session lists no handle for the job
- `bg-tasks`: reading the old handle failed: Error: Unknown background task ID: b897aef90
- `better-bg`: the new session lists no handle for the job
- `pi-background`: the new session lists no handle for the job
- `pi-background`: reading the old handle failed: Error: No background job bg1; known: none
- `patty`: the new session lists no handle for the job
- `patty`: reading the old handle failed: Error: Job not found: job-352643-1
- `pi-async`: the new session lists no handle for the job
- `pi-async`: reading the old handle failed: Error: Unknown task or name: 9e449d61-50c6-4478-a4a0-3700407ebf96
- `pi-shell`: the new session lists no handle for the job
- `pi-shell`: reading the old handle failed: Error: No such task: 02304b87
- `exec-cmd`: the new session lists no handle for the job
- `exec-cmd`: reading the old handle failed: Error: Unknown session id undefined


### Mechanisms

#### Start admission latency (10 trivial commands)

| metric | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| medianMs | 2.2 | 5.8 | 6.8 | 106.2 | 0 | 2 | 2.6 | 2 | 3 | 41.8 |
| p95Ms | 4.5 | 9.2 | 12.1 | 153.7 | 0.1 | 2.3 | 2.9 | 2.2 | 3.3 | 46.8 |
| minMs | 1.8 | 5.6 | 5.5 | 93.7 | 0 | 1.8 | 2.3 | 1.9 | 2.7 | 41.7 |
| maxMs | 4.5 | 9.2 | 12.1 | 153.7 | 0.1 | 2.3 | 2.9 | 2.2 | 3.3 | 46.8 |
| firstCallMs | 2.6 | 6 | 4.9 | 111.6 | 0.1 | 2.6 | 2.9 | 2.7 | 3.7 | 42.3 |

- `bash`: first call in the process: 2.6 ms (module load and JIT warmup, excluded from the percentiles)
- `async-shell`: first call in the process: 6 ms (module load and JIT warmup, excluded from the percentiles)
- `bg-tasks`: first call in the process: 4.9 ms (module load and JIT warmup, excluded from the percentiles)
- `better-bg`: first call in the process: 111.6 ms (module load and JIT warmup, excluded from the percentiles)
- `pi-background`: first call in the process: 0.1 ms (module load and JIT warmup, excluded from the percentiles)
- `patty`: first call in the process: 2.6 ms (module load and JIT warmup, excluded from the percentiles)
- `pi-async`: first call in the process: 2.9 ms (module load and JIT warmup, excluded from the percentiles)
- `pi-shell`: first call in the process: 2.7 ms (module load and JIT warmup, excluded from the percentiles)
- `shell-jobs`: first call in the process: 3.7 ms (module load and JIT warmup, excluded from the percentiles)
- `exec-cmd`: first call in the process: 42.3 ms (module load and JIT warmup, excluded from the percentiles)

#### In-turn causal barrier (400 ms command)

| metric | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| timeToResultMs | 402.7 | 448.9 | 429.3 | 899 | 426.9 | 403.6 | 404.9 | 429.9 | 403.7 | 443.4 |
| toolCalls | 1 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
| turnBoundaries | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| inTurnAwait | yes | yes | no | no | no | yes | yes | yes | yes | yes |
| status | completed | completed | completed | completed | completed | completed | completed | completed | completed | completed |
| sawResult | yes | yes | yes | yes | yes | yes | yes | yes | yes | yes |

- `bash`: bash blocks, so the result is in hand when the call returns
- `bg-tasks`: no await: the result is only reachable after the completion notification wakes a new turn
- `better-bg`: no await: the result is only reachable after the completion notification wakes a new turn
- `pi-background`: no await: the result is only reachable after the completion notification wakes a new turn

#### 30 MiB of output against the log cap

| metric | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| status | completed | completed | failed | completed | completed | completed | failed | completed | completed | completed |
| exitCode | 0 | 0 | — | 0 | 0 | — | 1 | 0 | — | 1 |
| loggedBytes | 4121 | 31457289 | 20971595 | — | 31457289 | 31457289 | 20971520 | 31457289 | 1863680 | — |
| wallMs | 270.8 | 207.3 | 327.3 | 1033 | 4675.2 | 16.1 | 40.1 | 63.2 | 20.1 | 811 |
| killedByCap | no | no | yes | no | no | no | yes | no | no | no |
| tailSawFinished | yes | yes | no | yes | yes | yes | no | no | no | yes |

- `bg-tasks`: status text: ✗ b0a7a57d0 failed 305ms exit=null pid=345743 — cap error=Output exceeded cap of 20.0MB; terminating task
- `pi-async`: status text: []

#### Locate one line in a 200k-line log

| metric | bash | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|---|
| found | no | yes | no | no | no | yes | no | no | no | no |
| bytesReturned | 24108 | 362 | 102666 | 32342 | 48354 | 147 | 112149 | 236 | 49250 | 80444 |
| calls | 1 | 1 | 2 | 2 | 2 | 1 | 2 | 2 | 2 | 2 |
| logBytes | — | 2288901 | 2288901 | — | 2288901 | 2288901 | 2288901 | 2288901 | 2288901 | — |

- `bash`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `bg-tasks`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `better-bg`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `pi-background`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `pi-async`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `pi-shell`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `shell-jobs`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000
- `exec-cmd`: no search: the reader offers only head and tail, and the marker sits at line 150000 of 200000

#### Three parallel 400 ms commands

*Three independent commands should overlap.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async | pi-shell | shell-jobs | exec-cmd |
|---|---|---|---|---|---|---|---|---|---|
| startSpanMs | 14.2 | 8.8 | 329.2 | 0.2 | 7 | 7.4 | 6.8 | 260.5 | 258.3 |
| wallMs | 451.8 | 433.2 | 1475.5 | 424.2 | 408.4 | 409.1 | 481.8 | 412.2 | 448.8 |
| toolCalls | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
| notifications | 0 | 3 | 3 | 3 | 0 | 0 | 0 | 0 | 0 |
| parallel | yes | yes | yes | yes | yes | yes | yes | yes | yes |

- `bash`: bash is one blocking call: three commands are three sequential calls

#### Completion notification payload

*An idle turn should be woken by the command finishing.*

| metric | async-shell | bg-tasks | better-bg | pi-background | patty | pi-async |
|---|---|---|---|---|---|---|
| notificationBytes | 404 | 498 | 325 | 144 | 60 | 309 |
| delivered | yes | yes | yes | yes | yes | yes |

- `bash`: no completion notification exists
- `pi-shell`: no completion notification exists
- `shell-jobs`: no completion notification exists
- `exec-cmd`: no completion notification exists


## Reading the numbers

- `—` means the implementation cannot express the scenario: there is no tool
  that could do it. It is not a zero and not a failure to be scored.
- `bytesIntoModel` is the byte count of every tool result the scenario takes.
  It is what the agent pays in context to act; it excludes the system prompt,
  the model's own tokens, and the benchmark's bookkeeping.
- `readyMs` in `dev-server` includes the fixture's 1.2 s startup and, for
  implementations without a readiness signal, up to one 200 ms poll interval.
  The shared 1.2 s is a floor; `readyCalls` is the part that differs.
- `interactive.promptVisible` and `interactive.answered` are separate on
  purpose: an implementation can show the prompt in its log and still be unable
  to answer it. A single yes/no would hide which half failed.
- `cancel-cleanup.leakedAfter` counts live processes whose command line still
  carries the scenario's marker after the cancel returns. Anything left over is
  killed by the benchmark after it is counted, so the run leaves no strays.
- `restart-recovery` starts the job from a child process that SIGKILLs itself,
  waits for the job to finish, then opens a fresh session in the same directory.
- `survival` starts the task from a child process that exits after 300 ms, then
  counts the lines written over the next 2.8 s.
- `barrier.timeToResultMs` includes the turn boundary for implementations with
  no await: the notification has to wake a new turn before the result is
  reachable. The model's own latency is not modelled, so this understates the
  cost of a turn boundary rather than overstating it.
- `log-cap.killedByCap` is the mechanism behind the largest blast radius. An
  implementation that kills the task at its cap reports `failed`; one that stops
  appending and keeps draining reports `completed`.
- `retrieval.bytesReturned` is the context cost of the best available call.
  Without a search, the reader reads both ends and still misses the middle.
- `admission` measures a start plus a forced cancel, ten times, after one
  unmeasured warmup call. The warmup is reported as `firstCallMs` because module
  loading and JIT belong to the process, not to the admission path.
