# Issue 25021 — proof audit pass 1

Scope: branch `fix/issue-25021`, committed head `064702b0d6bf6834ed37ce4e4621cba2f8edb03f` against `313ca2715f`. Parent refreshed provenance after the pass-1 audit; working tree is clean and both independent reviewers verified this exact diff. Runtime after proof was captured just before this implementation commit; evidence index states that provenance limitation.
Issue: [#25021](https://git.cafe/pingdotgg/t3code/issues/25021).

## Visual matrix

**Empty (0 fixtures).** Only `ClaudeAdapterV2.ts` and its test change. No render code, client contracts, or presentation change. The server-only proof rule applies: red regression test plus runtime transcript; screenshots/browser verification are unnecessary.

## Logical fixture matrix

| Path / fixture | Expected evidence | Pass-1 assessment |
| --- | --- | --- |
| Claude idle background wake → buffered wrapped 503/429 result → continuation delayed one hour | Regression fails before fix; usage_limit resetAt equals arrival + 2h54m21s after fix | New deterministic TestClock test asserts failed terminal, usage_limit, exact resetAt; transcript reports red 03:54:21 versus expected 02:54:21 and green after. Not independently rerun. |
| Controlled CLI stdio → real dev server → buffered continuation → persisted failure | Before/after runtime transcript and persisted resetAt | Read transcript plus before-runtime.json/after-runtime.json. Before wake emission 22:16:22.529Z, reset 22:17:22.987Z (+458ms replay drift); after emission 22:17:39.148Z, reset 22:18:39.148Z. Completion remains at replay (22:17:39.592Z). |
| Real Claude native background Agent wake, no gateway cooldown | Baseline demonstrates actual background wake path | Parent transcript reports sleep15 then WAKE OK; not independently witnessed. |
| Active/nonbuffered Claude result; structured absolute rate-limit reset; success/nonmatching gateway failures | Existing focused adapter tests remain green | Code retains completedAt fallback, structured reset precedence and failure parsing. Existing gateway and rate-limit tests found; 236/236 adapter tests passed; format, lint and typecheck passed. Unrelated preexisting knip agent-device dependency failure remains. |
| Buffered result identity across replay | Receipt timestamp survives queue delay without moving completion time | Code stores arrival in session-local WeakMap, buffer retains original objects, drain passes original lastResult to handler. No new timer or serialization. |

## Providers, surfaces and entry paths

- Claude adapter only; other providers (Codex, Cursor, Grok, OpenCode, Antigravity) have no changed path.
- Web, desktop and mobile consume corrected server failure/reset data indirectly. Local, remote/relay and tunnel share this adapter behavior; no transport-specific change or visual fixture is required.
- Background task notification / provider continuation is the affected entry path; ordinary active turns use the existing fallback. Chat, Settings, palette, keybindings, MCP and scheduled-task interfaces gain no new control or contract. No new reverse operation or documentation requirement.
- Downstream usage-limit recovery/snooze/auto-resume is implicated by the corrected resetAt, but its scheduling code is unchanged.

## Unverified / required follow-up

- Final implementation commit is 064702b0d6bf6834ed37ce4e4621cba2f8edb03f; both reviewers returned MERGE. Pass 2 must confirm evidence matches it.
- Exact adapter receipt is not instrumented in runtime proof: fixture emission occurs immediately before stdout write. Deterministic TestClock test supplies exact delay proof.
- Live gateway exhaustion was not reproduced; runtime failure responses are synthetic at the CLI boundary, not real account-pool cooldowns.
- The one-hour test replays before the 2h54m21s cooldown expires; it proves anchoring, not the issue's entire expired-reset → auto-resume → queued continuation sequence. Downstream expired-reset scheduling and multi-device delivery were not independently exercised.
- Reported red/green test execution is transcript evidence, not an independently executed check in this pass. No browser/server/test starts or worktree modifications performed.

## FRICTION

- Requested `before/after-runtime.json` is represented by two files, `before-runtime.json` and `after-runtime.json`; both were found and inspected. No combined file exists.
- No blocking tooling friction. Final implementation checks were reported; pass 2 remains pending.
