Real-app comparison: Claude usage frames

Surface: web client, Chromium preview browser, 1280x800 CSS pixels, dark theme; Claude Code 2.1.330, Claude Haiku 5.5 selected. The local gateway supplies synthetic replies; no paid model or replay provider is used. Both commits run separately with fresh T3 homes and T3CODE_DEV_SEED=0.

Base: c585a58598d594255e6e550702cc982925aa6e3f
Head: 60e8c9b0e3d01126e06c6459801b26b2f3843787

Setup on each side:
1. Install with vp i; run gateway.py using Python 3. It listens on loopback port 19804.
2. Configure the Claude instance with an isolated home, its real Claude binary, and a --settings JSON env block containing ANTHROPIC_BASE_URL=http://127.0.0.1:19804, ANTHROPIC_API_KEY=synthetic-proof-key, ANTHROPIC_AUTH_TOKEN="", CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1. These are synthetic credentials.
3. Start vp run dev with T3CODE_DEV_SEED=0 and an explicit isolated --home-dir. Add an empty synthetic project via the server CLI project add command. Pair the browser.
4. Run seed-browser.js in that paired browser with the synthetic project's id. This dispatches real thread.create commands with fixed titles and selects Claude Haiku 5.5. The corresponding ids are reused on both independent databases. Exactly one prompt is submitted to every captured thread.
5. Open each thread by /<environmentId>/<threadId>. Collapse the main sidebar and thread details through their normal toggle buttons before recording. Set dark theme and 1280x800 viewport.
6. Start the preview recording. Type `Say hello (<mode> usage frames)` in [contenteditable=true], click the Submit message button. Observe for 10 seconds; stop recording. Repeat the same script on both commits. No second submission was made to the captured null thread.

Gateway frames:
- empty: message_start.message.usage={} and message_delta.usage={}.
- null: both usage objects are null.
- partial: start {input_tokens:17,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0}; delta {input_tokens:17}, with output_tokens absent.
- negative: both {input_tokens:23,output_tokens:-3,cache_read_input_tokens:-2}.
- fractional: both {input_tokens:12.4,output_tokens:3.6,cache_read_input_tokens:2.2}.
- nonfinite: both {input_tokens:1e309,output_tokens:1e309,cache_read_input_tokens:-1e309}. These are syntactically valid JSON overflow numbers; the Claude subprocess serializes non-finite JavaScript numbers as null before T3 receives them. This exercises the real gateway/CLI path but cannot establish that Infinity/NaN reaches the T3 adapter unchanged. Both commits complete this case.

Observed: base empty, fractional, and negative stall without rendered reply; base null fails; base partial displays text but remains Working/Thinking. All six head cases render one reply and complete. In head runtime events partial usage is 17 input/0 output, negative is 23 input/0 output/0 cached, and fractional is 14 input/4 output/2 cached, all non-negative integers. Empty/null/all-invalid usage do not emit a context measurement. The final null thread has exactly one run and one assistant message.

All 12 videos were inspected using six sampled frames spanning each recording. They show the first prompt and its result, with matching titles and viewport. The null still pair was captured after two pixel-identical screenshots 500 ms apart. The other outcomes are provided as recordings because their base Working timer is part of the failure and never becomes static.

runtime-evidence.json contains only synthetic messages and selected persisted events read from each isolated database; extract-runtime.py generates it. It supplements, rather than replaces, the visible recordings.
