Revision note: final code head [1723431e82](https://git.cafe/pingdotgg/t3code/commit/1723431e82). This correction updates A2 to lowercase instructions; prior mixed-case A2 footage is a control only and cannot satisfy revised A2. Mixed-case instructed prose must retain bare pre-compaction and queueing on both base and final head. All existing capture gaps remain open.

# Proof audit PASS 1 — matrix only

Scope: [#20222](https://git.cafe/pingdotgg/t3code/issues/20222), branch `fix/issue-20222`, [fafd55cbfa](https://git.cafe/pingdotgg/t3code/commit/fafd55cbfa) against merge-base [70e5e384da](https://git.cafe/pingdotgg/t3code/commit/70e5e384da). Read-only source review; no browser, server startup, repository edits, commits, or forge writes. Only this requested temporary matrix and its public upload are produced. No PR exists yet.

## Source-derived scope

The only production change is the explicit-command exclusion in `planComposerTurn`: case-insensitive exact `/compact` becomes case-insensitive anchored `/compact` followed by whitespace or end. `snapshotComposerSend` trims the prompt first. The sole production caller is `useComposerSend`; when compactBeforeSend is true it starts an extra bare `/compact`, then sends the original with forced queue dispatch. The fix removes both the extra turn and that forced queue for matching commands. Setup queuing remains independent.

ChatView gates this on an idle eligible Claude session, settings, dismissals, available operations, no held queue, and single-model selection. Footer Compact/Full chip and send-label rendering do not inspect command text and are unchanged. At narrow web widths, the collapsed action expands the composer while compaction is offered; the expanded action reaches the same send handler. Enter and send-button paths converge through submitComposer. This is web behavior shared by desktop; native mobile has no compact-before-send feature.

## Fixture and capture protocol

S = isolated real dev app `http://localhost:7430`, server port 15470, checkout-local `.t3`. Lead reports a real native Claude Sonnet 5.5 session with a real OK response. Change only the client tokenUsage snapshot to usedTokens=250000, maxTokens=1000000, updatedAt=`2026-10-21T00:00:00Z`; preserve all other token fields, especially any cache TTL. Use dynamic imports `/src/state/threads.ts` and `/src/rpc/atomRegistry.ts`, their actual exported environmentThreadDetails and registry, then `registry.get(environmentThreadDetails.threadAtom({environmentId,threadId})).projection.providerTurns.forEach(t => t.tokenUsage = {...t.tokenUsage, usedTokens:250000, maxTokens:1000000, updatedAt:'2026-10-21T00:00:00Z'})`. Navigate Settings then history.back to remount. Confirm Compact chip, idle session, ordinary single-model mode, no attachments, no pending approvals/input, no held queue; otherwise fixture is invalid. This is a client presentation seed, not a claim of native 250k history.

For EACH AFFECTED web row below, run both revisions at 1440 and 390 CSS px in light and dark, fixed 900px viewport height, same zoom, motion preference, model/options, server, seed, and input. Four matched before/after recording pairs per row. Restore an equivalent fresh real session and seed before each send: compaction changes native history and the client seed can be replaced by live snapshots. Record from seeded pre-send state through dispatch, compact activity/queue changes, and settled terminal outcome or explicit provider error. Stop on observable completion, not an arbitrary sleep. Capture user-message IDs/text and dispatch modes from read-only persisted events as supporting evidence. Count new messages relative to baseline, not lifetime thread totals. Match conditions, not nondeterministic provider prose or durations.

R = recording required. S = still only. Every interaction/time row is R. Diff0 stills and threshold difference stills supplement recordings; never substitute for them. Redact credentials, pairing URLs and unrelated history before public evidence upload. Rows below prescribe captures; none was executed by this reviewer.

| ID | Affected flag | Capture kind | Surface / caller | Seed | Exact script and expected comparison | Minimum capture set |
|---|---|---|---|---|---|---|
| A1 | Yes | R, plus stills | Web expanded composer → submitComposer → useComposerSend | S; Compact enabled | Paste `/compact Keep the interface decisions, drop the debugging output`; click Compact and send. Before: bare `/compact` plus original, original queued. After: original alone, default auto dispatch. Show chip, submitted text, compact activity and settled result. | Four matched recording pairs; aligned pre-send diff0 still pair and post-dispatch threshold still pair per viewport/theme; persisted message/dispatch evidence. |
| A2 | Yes | R | Web keyboard send, same caller | S | Paste `/compact  keep the interface decisions`; press configured Enter-to-send key once, avoiding slash-menu selection. Before two user messages; after one preserving lowercase command and double space; after dispatch auto. | Four matched recording pairs; message/dispatch evidence. |
| A3 | Yes | R | Web multiline composer, same caller | S | Paste literal `/compact\nkeep the interface decisions` (actual newline), then click send. Before extra bare command; after one multiline command, no forced queue. Show multiline layout and outcome. | Four matched recording pairs; message/dispatch evidence. |
| A4 | Yes | R | Narrow collapsed/expanded web branch; expanded fallback at 1440 | S; collapse composer where supported | Enter A1 text; collapse narrow composer; click action labelled Open composer to compact and send. Assert expansion alone sends zero messages; click expanded send. At 1440 use normal expanded send. Before two messages; after one. | Four matched recording pairs, including 390 expansion and expanded send; message evidence. |
| A5 | Yes | R | Web normalized whitespace / regex boundary | S | In separate reset sessions paste `  /compact keep decisions  ` and `/compact\tkeep decisions` (actual tab). Click send. Outer whitespace trims before planner; tab is a command boundary. Before two messages; after one. | Four matched recording pairs per input; normalized persisted text and dispatch evidence. |
| C1 | No, exact-command control | R | Web same send caller | S | Separately send `/compact` and `/COMPACT` by click. Both revisions send exactly one command with default dispatch. No injected extra command. | One matched pair per input at 1440/light. |
| C2 | No, negative boundary controls | R | Web same send caller | S | Separately send `/compactness keep decisions`, `/compact/keep`, and `Please /compact keep decisions`. Both revisions prepend bare `/compact` then original, forced queue. Provider rejection of original text is acceptable if documented; inspect submitted messages rather than assuming command support. | One matched pair per input at 1440/light; persisted ordering/dispatch. |
| C3 | No, ordinary-send control | R | Web same send caller | S | Send `Reply OK` with Compact enabled. Both revisions compact once first and queue original. | One matched pair at 1440/light; persisted ordering/dispatch. |
| C4 | No, opt-out and reverse state | R | Web Compact/Full chip → same send caller | S | Click Compact to Full; send A1 text. Both revisions send original alone. In fresh seeded session click Compact→Full→Compact and send `Reply OK`; both compact first. Keep toggle sequence in recording. | Two matched recording pairs at 1440/light. |
| C5 | No, eligibility threshold/time controls | R, plus threshold stills | Web ChatView resume offer → same send caller | S variants | Separately use 250000 tokens with updatedAt=now (fresh), and stale updatedAt with usedTokens=99999. Remount as above; assert no Compact offer, send A1 text; both send one original. At eligibility boundary use 199999 and 200000 tokens (source constant is 200000) with stale time; inspect chip before sending. | One matched pair per variant at 1440/light; threshold stills supplemental. 99999 is an independent below-threshold control, not the boundary. |
| C6 | No, unavailable render branches | R | Web ChatView eligibility and primary actions | S variants | Observe empty composer Resume action if available, then enter A1 text. Separately observe running native turn and held queued run; Compact offer must be absent per gate. Do not force impossible eligible-running fixtures. Cancel only a run created for this proof. | One matched pair per reachable state at 1440/light; record entry and exit. |
| U1 | Shared logic affected; shell unverified | R required for future verification | Desktop Electron wrapping web | Equivalent isolated S | Repeat A1 and A3 in desktop shell when available; capture shell, send and result. Linux reviewer has not exercised native shell, IPC or OS keybindings. | No desktop captures obtained; future one matched pair per script. Web evidence cannot certify shell. |
| U2 | No feature / out of scope | None | Native mobile React Native | None | No compact-before-send feature to exercise. 390px rows above are responsive web, not native mobile proof. | Source scope statement; no native capture required. |

Additional pure-function boundary checks (not visual rows): `/compact\r\nkeep`, `/compact` plus NBSP plus `keep`, and `/compactX` exercise whitespace versus suffix; leading whitespace passed directly to planner is intentionally distinct from the trimmed production caller. Assert compactBeforeSend, turnDispatchMode AND shouldQueueBehindActiveRun. The three added regressions assert only the first two. Test sendQueuesBehindSetup=true with explicit compact: still queue, shouldQueueBehindActiveRun=true. Running/steer and running/queue remain existing controls with resumeCompactionTokens=null because the actual UI suppresses this idle offer while running. No UI recording is demanded for unreachable planner combinations.

## Constraints and unverified claims

This is pass-1 matrix sufficiency, not execution approval. No recordings, screenshots, tests or live persisted events were independently inspected or produced. Lead reports two new persisted user messages before versus one after; that is supplied evidence, not this reviewer's independent observation. Desktop shell, remote/relay/tunnel execution, and actual native provider compaction fidelity remain unverified. Client-only seeding proves the eligibility/send branch, not a real stale 250k native history. Provider runtime/version and original prompt must be identical across paired runs. There is no new RPC/schema/provider adapter path here; remote modes use the existing typed startThreadTurn transport, so no separate transport implementation is changed. Settings changes, command palette actions, manual compaction, scheduled tasks and MCP sends do not call this planner; they are not additional affected entry points. Multi-model sends and unavailable provider modes suppress the offer. Attachment uploads and worktree creation are unchanged upstream/downstream branches; no exhaustive unrelated cross-product is required for this small predicate fix.

## FRICTION

| category | happened | prevention |
|---|---|---|
| State source | Lead reports server DB projection edit did not reach event-derived client snapshots. | Seed only isolated client projection; remount via Settings/history.back; verify visible chip before every capture. |
| Native realism | Client token count is synthetic although native session and OK response are real. | Preserve native history; disclose limitation; do not describe the fixture as actual 250k context. |
| Repeatability | A send changes history and live snapshots can overwrite seeded usage. | Equivalent fresh native fixture for each revision/input; seed immediately before recording and verify eligibility. |
| Evidence type | Static diff0 or threshold images cannot demonstrate duplicate sends, ordering or completion. | Recording mandatory for every interaction/time row; attach persisted event deltas as corroboration. |
| Coverage | Narrow web is not native mobile; web is not Electron shell verification. | Keep surfaces explicit and mark desktop unverified. |
| Audit restriction | No browser/server actions authorized in this pass. | Deliver a source-derived matrix only; leave capture execution to the lead. |

VERDICT: SUFFICIENT

The matrix is sufficient for PASS 1: it covers the changed predicate, dispatch consequences, actual submit and responsive branches, regex positives/negative controls, opt-out reverse state, and evidence limitations. This verdict does not claim the fix or capture suite has passed execution.
