# Proof audit pass 1 — issue 18386

Scope: [#18386](https://git.cafe/pingdotgg/t3code/issues/18386), no PR. Read-only review of `/home/ubuntu/wt/issue-18386`, branch `fix/issue-18386`, clean at inspection. Before [4eae8ae011](https://git.cafe/pingdotgg/t3code/commit/4eae8ae011); after [b32bc0d25d](https://git.cafe/pingdotgg/t3code/commit/b32bc0d25d) (full head b32bc0d25d8a079c98c1fe80e90cfb4dc4c2eb8c). Only ClaudeAdapterV2.ts and its test changed. This is a proof plan, not a claim that capture or runtime checks passed. No servers, browsers, captures, tests, source edits, comments, or pushes were performed in this audit. Report creation/upload only.

## Finding and scope

Server-only implementation is accurate; server-only observable impact is not. A CLI denial on an otherwise completed result now emits one completed system_notice, then terminates failed with permission_error / permission_denied / retryable:false. Existing failed-turn ingestion produces the existing error presentation. Pending approvals are not synthesized. Existing API failures retain their reason but gain the notice; interrupted turns suppress the notice and remain interrupted. T3-owned denials are filtered by tool-use ID. All providers other than Claude are outside this change.

The request's ideal one-click mode switch/retry is not implemented. Do not claim it. Also do not promise recovery by mode switching alone: an explicit project deny rule may require removing that rule. Auto classifier and project-rule denials share result handling, but the real CLI rule reproduction alone does not prove classifier reason delivery. Missing reason must still produce a useful notice.

## Minimum named fixture matrix

Legend: W4 = web 1440×900 light, 1440×900 dark, 390×844 light, 390×844 dark. Each cell is a BEFORE/AFTER pair, never a lone after image. DPR=1, fixed zoom/font/locale/time zone. Native dimensions are logical client points; record actual device pixels separately. “Recording” always means both versions and deterministic checkpoint stills, not screenshots substituted for motion. Static rows get full app viewport screenshots. All rows below are planned/unexecuted.

| Fixture / row | Affected shape, caller and expected before → after | Minimum captures: 1440/390 × light/dark × platform | Real-app route / seed / interaction |
|---|---|---|---|
| D1 — CLI single denial, no pending request | Main regression. One Bash denial with matching system permission_denied reason; normal assistant answer plus ordinary tool work. Completed/no notice → failed, one warning notice with command/reason, existing permission failure row/banner and failed thread status; no approval card. Cover selected chat and unselected thread-list indicator. | **W4 screenshots** of whole chat. At 1440 include sidebar; at 390 capture one additional list checkpoint in each theme because responsive chat hides it. | Seed one isolated Claude project/thread, Auto, exact `printf T3_DENIAL_PROBE`, project rule `Bash(printf T3_DENIAL_PROBE*)`. Open normal `/<environmentId>/<threadId>` chat route (pathless `_chat` layout), then normal thread list. Theme through `/settings/appearance`. Same IDs/history on each version. Include neighbouring successful thread as visual control. |
| D2 — bounded multiline notice | Six CLI denials in one result: five visible plus `and 1 more`. First command >400 chars with long unbroken segment; second path-only tool; third JSON-only tool; mix matching long reason (>400 chars, ANSI stripped) and absent/blank reason. Exercises command/path/JSON summaries, reason fallback, newline/wrap, existing warning icon, failure row and grouping. No extra fixture for each summary shape. | **W4 screenshots** at fixed bottom anchor; if content exceeds viewport add a second fixed scroll checkpoint, with matching offsets per version. Whole surface, no cropped row-only proof. | Deterministic SDK replay through adapter, then app route as D1. Do not forge a separate UI warning component. Optional visual-only projection seed is allowed only with explicit label and accompanying adapter assertions. |
| D3 — denial lifecycle / persistence / manual recovery | Active → terminal, no approval generated, failed remains visible; notice survives reconnect/reload without duplication. Open/close notice detail if actual row affords expansion; existing banner dismissal must not erase persisted notice. Change Auto to Default using existing composer control, send follow-up; new successful turn clears current failure while historical notice remains. For rule fixture remove isolated deny rule before retry, or recovery assertion is invalid. | **W4 recordings**, checkpoint still pairs at active, terminal, reload and recovery. Sequence may reuse D1 terminal stills. No additional static Cartesian matrix. | Real app commands for start, mode change, follow-up, reconnect. Freeze wall-clock but release prescribed event checkpoints. Keep exact assistant text and replay outputs identical across versions. Recording shows actual controls and complete viewport. Runtime payload proves zero actionable requests for CLI denial. |
| D4 — settlement and snooze attention | Status propagation beyond chat: failed result prevents auto-settlement and a fresh failure after snoozedAt wakes a snoozed thread. Before completed can stay hidden/settle under configured policy; after failure remains/reappears in active list. Separate scenario stages for auto-settlement and snooze, same D1 payload. Failure completion must be later than snoozedAt. | **Recordings** at web 1440 light and 390 dark, plus matched checkpoint still pairs. D1/D2 already cover palette/layout combinations; do not multiply time logic by four. | Existing app auto-settle settings and snooze action, deterministic server clock advance + settlement drain. Show list before denial, terminal, policy evaluation and reopened chat. Do not rely on sleeps or an arbitrary spinner timeout. Seed policy that actually makes the before state eligible, and record exact settings. |
| D5 — mixed T3 and CLI ownership / unchanged controls | One real T3 decline plus one CLI denial in same turn: only CLI action appears in new notice; original declined approval remains resolved. Companion T3-only and empty-denial turns stay completed with no new notice. This is classification, not three new layouts. | Mixed case **recording** at web 1440 light; matched checkpoint stills. T3-only and empty controls: runtime/assertion evidence, no extra visual permutations. | Existing Default approval flow for T3 decline, then deterministic result containing both tool-use IDs. Assert no new runtime request is fabricated. Covers callback ownership; cancelled question / captured plan denial variants belong in focused adapter tests, not extra screenshots. |
| D6 — terminal precedence | API 529 plus CLI denial: existing API failure stays authoritative plus new notice. Aborted result plus denials: interrupted, no notice/failure override. Usage limit and compaction precedence are logic assertions, not new permission UI branches. | Runtime/assertion proof; **no extra static capture** unless replay shows a different coexisting layout from D1/D2. If claiming stop/cancel UX, add **recording** at web 390 dark; do not make that claim from unit results. | Use deterministic SDK frames through adapter. Existing new tests already assert 529 and aborted status, but do not prove UI/persistence or all terminal variants. Add narrowly scoped assertions for uncovered precedence where needed. |
| P1 — native mobile parity | Separate React Native warning/work-log renderer, detail expansion/copy, failed list subtitle and shared runtime/snooze state. Responsive web at 390 is not native mobile proof. | D1/D2 combined native fixture at **390×844 light and dark**: whole thread and list screenshot pairs. One **390 dark recording** for detail/list/reconnect; reuse D3/D4 event stream for wake assertion. One native OS minimum; second OS smoke only if claiming both validated. 1440 phone capture N/A; tablet matrix not required by this server change. | Connect actual mobile client to same isolated server fixture. Open thread and Threads list normally. Use app theme settings, same device/font scale/insets. No simulator/browser launch in this audit. If unavailable, mark native verification pending, not passed by web. |
| P2 — desktop wrapper parity | Desktop uses web timeline, banner and shared client state; no Electron/IPC component changed. Avoid duplicating W4. Shell fit and subscription delivery still deserve a smoke. | D1 at **1440×900 dark screenshot pair** of whole desktop content surface; one short **recording** of terminal/reopen/list status. 390 desktop and second desktop theme waived by renderer equivalence and W4. | Actual desktop connected to isolated environment, same fixture. No claim about OS notification delivery or dock badge unless separately exercised. No whole OS/platform Cartesian matrix. |

Minimum is two W4 static fixtures, one W4 lifecycle recording sequence, two attention recordings, one mixed-ownership recording, one mobile theme pair sequence and one desktop smoke. Reuse checkpoint stills; do not capture the same D1 terminal state twice. Controls/precedence get runtime assertions. Conditional extra screenshots are for overflow/list surfaces that cannot fit one full viewport, not arbitrary variants.

## Affected render/caller inventory and collapsed coverage

Source links below refer to the audited after commit. No client source changed.

| Path / caller | Reachability and fixture decision |
|---|---|
| [ClaudeAdapterV2.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts), result handler / canUseTool / finalization | reason map, T3 IDs, five-denial limit, 400-char summary/reason limits, interruption and failure precedence. D1–D6. Finalization also ends active tool calls and running same-run workflow subagents on failed status; cover with focused backend test if such work can coexist with CLI denials. Do not expand into every subagent UI. |
| [ProviderEventIngestor.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/server/src/orchestration-v2/ProviderEventIngestor.ts), [RunExecutionService.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/server/src/orchestration-v2/RunExecutionService.ts) | Existing turn.terminal failed path constructs error item; persistence/event/projection coherence needs integration evidence, not just adapter event assertions. D1/D3. |
| [threadExecution.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/packages/client-runtime/src/state/threadExecution.ts), [threadSettled.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/packages/client-runtime/src/state/threadSettled.ts), [ThreadSettlementService.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/server/src/orchestration-v2/ThreadSettlementService.ts) | Runtime lastError from root error, failed status and fresh failure edge change thread/list attention and settlement. D1/D3/D4, both server and client assertions. Manual settle is not promised to be impossible. |
| [session-logic.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/session-logic.ts), [MessagesTimeline.logic.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/components/chat/MessagesTimeline.logic.ts), [TimelineWorkEntryRow.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/components/chat/TimelineWorkEntryRow.tsx) | system_notice.message becomes warning label; notices stay standalone rather than folded into ordinary tool groups; failed runs also affect grouping. Existing error row has destructive styling and body. D1 ordinary surrounding work + D2 long notice cover these, not unrelated web-search/file-edit error renderers. |
| [ChatView.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/components/ChatView.tsx), [ThreadErrorBanner.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/components/chat/ThreadErrorBanner.tsx) | runtime lastError goes to existing ChatBannerLane; notice plus failure can yield more than one visible error/notice surface. Capture actual result, do not assume notice alone. D1/D3 include dismissal and fresh session state. |
| [itemDetail.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/packages/client-runtime/src/work-log/itemDetail.ts), [V2ItemInspector.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/web/src/components/chat/V2ItemInspector.tsx) | Nonempty system_notice message qualifies for detail. D3 records available detail affordance. Inspector displays raw message/error for diagnostics; runtime export can verify contents, no separate developer-inspector screenshot matrix. |
| [threadActivity.ts](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/mobile/src/lib/threadActivity.ts), [thread-work-log.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/mobile/src/features/threads/thread-work-log.tsx), [thread-list-v2-items.tsx](https://git.cafe/pingdotgg/t3code/blob/b32bc0d25d/apps/mobile/src/features/threads/thread-list-v2-items.tsx) | Separate native notice/warning color, multiline preview/detail behavior, failed error row and one-line failed list subtitle. P1 is necessary; web-only proof leaves native claims open. Mobile activity inspector is diagnostic, covered by payload evidence. |
| Settings, palette, keybindings, scheduled turns, MCP, remote/relay | No new control or contract. Existing permissions control is recovery route D3; no need to screenshot Settings/palette/keybindings as separate entry points. Root adapter applies to turns regardless of origin; assert scheduled/MCP callers use same path if claiming coverage. Same typed existing notice/failure wire shapes: no separate transport matrix; one reconnect/remote native/desktop subscription pass suffices. No claim that relay/tunnel was exercised unless it was. |
| Other providers, unrelated errors, widgets/OS notifications, marketing | No changed producer or UI code; exclude generic error snapshots, every provider, every theme on every OS. Native widget/notification timing is not proved by static failed state; only add if product claim includes it. |

## Smallest reproducible seed route to implement next

No committed formal seed is present in this two-file diff. Do not present exploratory turns as that fixture. Smallest split:

1. Commit one issue-specific deterministic SDK transcript/fixture and a small runner around existing ClaudeOrchestratorReplayHarness / ProviderReplayHarness. Reuse existing event-sourced app command ingestion and persist coherent V2 state to an explicitly isolated T3 home. Fixed ID allocator, DateTime/TestClock, project path/content, SDK reason/result, assistant reply, tool order and terminal milestone. Parameterize D1/D2/D5/D6 instead of building a general-purpose fixture system. Review feasibility of persisting the existing test harness before adding any public dev fixture route; there is no claim that a browser-ready replay switch already exists.
2. Run the exact same fixture input on before and after. Expected output changes by adapter behavior, not manually seeded expected status. Export input hash, events and persisted projections; drain OrchestrationEffectWorkerV2 and settlement service at the required milestones. Serving that isolated DB in the normal app gives real renderer captures; replay provider source must be labelled “deterministic SDK replay” rather than live Claude.
3. For wrapping-only D2, a smaller committed projection seed using apps/server/scripts/t3-sqlite-state.ts is acceptable if coherent replay export is costly. Use migrated statev2.sqlite, seed with server stopped, validate contracts and relationships. Label it **visual-only projection fixture**; it cannot establish terminal status, settle prevention, wake behavior or provider reason provenance. Do not use the old V1 mobile-showcase seed: source explicitly says V2 clients do not read its V1 thread rows.
4. Preserve one real CLI smoke separately: isolated Claude config/project settings, Auto, deny rule for the exact harmless probe, same prompt. Record actual CLI/SDK versions and received system permission_denied/result permission_denials. Prefer project rule over probabilistic classifier content for repeatability. A deterministic fixture with classifier-shaped reason can cover formatting but cannot prove a real classifier emits that frame; get one real classifier payload or explicitly limit that claim.

This is the real app route, not a component harness proposal. A labelled component harness is a last resort only after documenting why the real app cannot load the state; neither lack of seeding nor convenience makes it impossible. No such impossibility established here. Implementing/committing the seed is a parent-task recommendation, outside this read-only audit.

## Formal capture protocol and acceptance

- Two separate checkouts or sequential isolated builds at the exact SHAs above. The same committed seed/capture utility must be usable for both; keep production code at the target SHA and record fixture revision/hash separately. Fresh isolated homes copied from the same initial fixture, never a single evolving project reused for the two sides. Never run against live ~/.t3/userdata.
- Identical project/thread IDs, seeded transcript, surrounding threads/history, open panels, selected thread, expanded state, scroll position/anchor and session banner dismissal state. Identical viewport, DPR, zoom, native font scale, theme, fonts, locale, time zone and clock. Freeze the same UTC instant for static captures. For lifecycle/time rows advance virtual time to the same named milestones; freezing must not stall effects, requestAnimationFrame or recordings. Pin renderer/client build identity and provider SDK/CLI version in manifest.
- Capture whole app surface, labelled BEFORE/AFTER and fixture/checkpoint/theme/viewport/platform. Do not crop away sidebar/composer/banner to hide unrelated deltas. At narrow width separately show hidden list surface with the same navigation sequence. Let font loading and layout stabilize using explicit readiness signals; no timing-by-sleep assertions.
- Interaction/time rows MUST have recordings of both sides; checkpoint screenshots alone cannot prove attention wake, settlement, reconnect, decline, dismiss or retry. Align recordings by event milestones, not wall-time guesswork. Retain associated runtime/event evidence: run/provider-turn status, permission_error/code, error item, notice text/count/order, pending runtime requests, settlement and snooze fields. Use event/effect completion barriers.
- For **every** screenshot/checkpoint pair produce a raw zero-tolerance diff (“diff0”: any changed RGBA pixel), and a threshold diff with threshold explicitly fixed in advance (suggest max channel delta >16/255, no hidden masks), changed-pixel count/percent and heatmap. Record tool/version and threshold semantics; diff0 is an artifact requirement, not an expectation that a behavior fix produces zero changed pixels. Record comparison dimensions; dimension mismatch is failure, not silently resized input.
- For recordings retain both videos and compute diff0 + threshold diffs on aligned checkpoint frames (and sampled frames if making motion claims), with frame timestamps/milestone mapping. Explain nondeterministic frames; do not pretend videos have exact correspondence without it. Identical pre-result control frame should have diff0=0 where the fixture is truly frozen.
- Write “what else changed” for every pair. Expected: notice insertion, existing failure row/banner/status, resulting timeline regrouping/vertical displacement, list/settlement/snooze placement. Unexpected: assistant words, token counts, timestamps, project/session selection, theme/font, sidebar order, scroll drift or unrelated banners. Enumerate and explain each unexpected change; regenerate contaminated pairs. Do not erase legitimate reflow with masks.
- Acceptance: D1 state and notice visible on normal app, D2 full details readable without horizontal overflow and omitted count correct, D3 durable/history-preserving recovery, D4 actual settle/wake result, D5 no misclassified T3 denial or bogus approval, D6 precedence retained. P1/P2 pending until captured or explicitly scoped out with rationale. Backend test assertions complement, not replace, real client proof.

## Existing evidence assessment

User-provided lead: real CLI before twice, Auto + Bash(printf T3_DENIAL_PROBE*) deny, persisted completed with requests[]; after same project third turn failed with reason notice, screenshot + recording + runtime. Useful reproduction and adapter-to-runtime corroboration, not independently re-examined in this pass. Different turns/history and unfrozen inputs/clock prevent formal identical-fixture before/after comparison. Keep it as exploratory evidence and regenerate controlled pairs; do not rebrand it as passing the protocol above.

## FRICTION

- Formal proof gap: no committed reproducible seed/fixture runner in current diff; existing tests are adapter-level and do not generate formal browser-ready before/after states. Parent must implement the small deterministic route before formal capture.
- Authority boundary: this pass explicitly forbids capture/edit/start/browser/comment/push; no operational capture attempted and no permission requested. No evidence assets were created beyond this report.
- Native/desktop proof pending. Linux audit host identity is fs-20, outside the supplied fleet table; no other machine was touched. Device availability was not tested.
- Auto classifier delivery/reason remains distinct from the deterministic rule reproduction. Avoid expanding security-content prompts into a flaky visual fixture.
- Source diff introduces non-completed finalization effects on active background workflow children; assess narrowly with backend replay rather than assuming notice-only impact.
- No infrastructure blocker encountered reading source/issue. Test suite and fixture feasibility were inspected, not executed. Upload result will be reported separately.

Audit harness/model: T3 Code / Codex, gpt-6.1-sol. Report-only read-only proof audit.
