# Runtime proof — issue 15135

Server-only change: [defb7e6e6b](https://github.com/pingdotgg/t3code/commit/defb7e6e6b) → [491622c835](https://github.com/pingdotgg/t3code/commit/491622c835).
[Proof matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5a912a36805e0750/proof-matrix.md): visual matrix EMPTY. No browser, capture, fixture, server startup, implementation edits, forge operations, or extra tests performed by this evidence agent. Lead owns the real app and completed the integrated pass.

Environment: isolated Linux development worktree, real web client, Claude Opus 5.5 and Codex. Only the worktree `.t3/userdata/statev2.sqlite` was queried, with SQLite URI `mode=ro` and `PRAGMA query_only=ON`; live T3 state was never queried. Extraction-time checkout [a51b8d220f](https://github.com/pingdotgg/t3code/commit/a51b8d220fd77e38e371e227cbafda40cc03dcd3) contains the fixed revision. Tested revision/client/model provenance is lead-supplied; persisted database state independently establishes outcomes, not the server binary revision.

Repro prompt: `Call t3_thread_organize with {"action":"archive"} and no threadId, then reply "done". Do only this; no file edits.`

Expected: active self-archive rejects with an actionable stop-before-archive error; archivedAt stays null; tool settles and provider continues to a completed run.

Actual before (supplied sanitized before-runtime.json): Claude archivedAt 2026-10-22T03:16:58.046Z; run failed at 03:16:58.079Z, 33ms later, with provider event stream closed unexpectedly. Archive tool remained running with completedAt null, and no final assistant response.

Actual after (read directly from isolated database):

- Claude thread fc1a6cca-8f4f-4294-a95d-65b885bf3a60, ordinal 2: archive input has only action=archive. Tool status failed (expected rejection), settled 06:56:31.541Z with OrchestratorMcpFailure / orchestration_error and “is still running. Stop it before archiving.” Assistant responded “done” with explanation; run completed 06:56:35.161Z. archivedAt null.
- Codex thread ff591770-ed3e-4253-ac98-2c5eda309e61, ordinal 2: equivalent input and rejection, settled 03:19:49.935Z. Assistant responded “Archive failed: this thread is still running. Stop it before archiving.” Run completed 03:19:51.711Z. archivedAt null. Codex did not literally reply “done”; its completed response still establishes continuation.
- Excluded attempt: Claude ordinal 1 failed 03:25:13.484Z after request 03:21:59.906Z. Persisted error says provider could not start this turn. Lead attributes this to unrelated VM interruption; the database does not independently establish that cause. Codex ordinal 1 was cancelled and is also outside the successful proof.

Reported checks (not rerun or independently log-verified here): tester reports `rejects archiving a thread while a run is %s` failed on main for starting/running/waiting, because archive returned success storedEvents instead of the expected error. Implementer reports green runtimeLayer 86 tests and control reads/MCP 234 tests on the fix.

Exact extraction commands (WORKTREE denotes the isolated issue-15135 checkout; extraction script is a local scratch artifact):

```sh
WORKTREE=/home/ubuntu/wt/issue-15135 python3 /tmp/issue-15135-evidence/extract-runtime.py
git -C /home/ubuntu/wt/issue-15135 rev-parse HEAD
git -C /home/ubuntu/wt/issue-15135 merge-base --is-ancestor 491622c835 HEAD
```

The script opens `sqlite3.connect('file:' + os.environ['WORKTREE'] + '/.t3/userdata/statev2.sqlite?mode=ro', uri=True)` and enables `PRAGMA query_only=ON`. Exact parameterized SELECTs, with each target thread UUID supplied as the sole parameter:

```sql
SELECT archived_at FROM orchestration_v2_projection_threads WHERE thread_id=?;
SELECT ordinal,status,requested_at,completed_at FROM orchestration_v2_projection_runs WHERE thread_id=? AND ordinal=2;
SELECT i.payload_json FROM orchestration_v2_projection_turn_items i JOIN orchestration_v2_projection_runs r ON i.run_id=r.run_id WHERE r.thread_id=? AND r.ordinal=2 ORDER BY i.ordinal;
```

Only user_message, dynamic_tool, and assistant_message records are retained, with an allowlist of type/toolName/input/output/status/startedAt/completedAt/text. Thread correlation UUIDs are retained; provider/session/native item IDs, tokens, private paths, and unrelated content are excluded from transcripts.

Gaps: no independent binary-revision attestation, no direct detach-effect inspection, no direct queued-only archive or mixed-run control in this proof. Starting/waiting behavior relies on reported deterministic tests. These are the existing matrix limitations, not additional test work. Friction: an earlier Claude startup attempt failed; the later successful ordinal-2 attempt supplies the requested proof. No visual work was applicable.

Sanitization: reviewed all three public artifacts. Runtime content contains only the reproduction prompt, archive rejection, assistant response, timestamps, run states, and non-secret thread correlation IDs; no credentials, tokens, pairing URLs, private filesystem paths in transcripts, or provider session IDs. Report commands intentionally identify the authorized worktree and scratch artifact locations.
