Issue 23820 / PR 23821 — real server service-path evidence Captured 2026-10-24 UTC on fs-19, Linux x86_64, Node v26.12.1 via the worktree vp runtime. Main: d53873b6a4799e87afd63c8d288ef0089f5a3748 PR: 2ea956066e6f19ac7f9116ff4cf84b5c3e179135 Each revision was checked out in /home/ubuntu/wt/issue-23820 and vp install ran. METHOD A real T3 server listened on 127.0.0.1:18420. Separate fresh --base-dir paths under the isolated worktree were used for main and PR. No live ~/.t3 data was read or written. No browser was used. Temporary diagnostic POST /__evidence23820 seeded a stopped synthetic thread through production EventSinkV2.write, read the persisted SQLite ProjectionStoreV2.getThreadProjection, called production ContextHandoffServiceV2.prepareProviderHandoff, and persisted the returned context-handoff.updated through EventSinkV2.write. A final projection read confirmed one durable handoff. Input: 103 items: initial user request, 100 completed command_execution items with exactly 32768 ASCII bytes of output each, assistant response, latest user request. Service token-cap config T3CODE_CONTEXT_HANDOFF_TOKEN_CAP=16000; instrumentation confirms selector budget 16000 (this selector's budget accounting uses serialized bytes). No provider adapters, selectors, event sink or SQLite layers were mocked. Temporary selector instrumentation increments serializedCandidates immediately before the per-candidate JSON serialization cost computation; it emits input counts, selection counts, timing and call stack. The normal selection logic is otherwise unchanged. The endpoint route is temporary diagnostic infrastructure and bypasses ordinary RPC authentication on the loopback test server. It is never shipped. LIMITATIONS This is running-server service-path proof, not a normal client RPC provider-switch flow, not a testkit run, and not real-provider end-to-end latency. The endpoint calls prepareProviderHandoff directly after reading seeded persisted history; no provider turn or provider history injection occurs. Runs are zero and activeProviderThreadId is null. Source records use null run/provider references and synthetic project ID; they exercise historical command selection rather than provider lifecycle validation. Wall times are small-sample, instrumented local observations, not robust performance guarantees. The exact revisions differ outside this one-line fix, so latency alone is not a controlled isolation of all other source differences. The candidate serialization counts directly demonstrate the guard's effect. RESULT Both revisions select item ordinals [0,101,102], omit all 100 oversized command outputs, and persist one handoff per request. Main serializes 103 candidates; PR serializes 3. Input command outputs are 3,276,800 bytes total. The 100 oversized candidates never enter per-candidate serialization on PR. COMMANDS git fetch origin main git fetch https://github.com/AksharP5/t3code.git perf/provider-handoff-history-budget git worktree add ~/wt/issue-23820 origin/main vp install # copy evidence23820.ts into apps/server/src and run instrument.py EVIDENCE_REVISION= T3CODE_CONTEXT_HANDOFF_TOKEN_CAP=16000 apps/server/src/bin.ts --host 127.0.0.1 --port 18420 --base-dir /.t3/evidence- --no-browser curl -sS -X POST http://127.0.0.1:18420/__evidence23820 python request.py .responses.json # stop confirmed loopback port owner after checking /proc//cwd # restore instrumented files, checkout exact PR SHA, vp install, repeat === MAIN: 6 HTTP requests, selector ms min/median/max 7.4086/13.2255/26.3910 === [13:04:08.275] INFO (#6321): Listening on http://127.0.0.1:18420 HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":26.391019000000597,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:828f65db-8174-4fb0-aae1-8af993a8bcf2:0","item:thread:evidence23820:828f65db-8174-4fb0-aae1-8af993a8bcf2:101","item:thread:evidence23820:828f65db-8174-4fb0-aae1-8af993a8bcf2:102"],"persistedHandoffs":1,"prepareMs":32.86917600000015,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":18.75375499999791,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:0","item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:101","item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:102"],"persistedHandoffs":1,"prepareMs":20.692294000000402,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":11.703354000001127,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:0","item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:101","item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:102"],"persistedHandoffs":1,"prepareMs":13.53076399999918,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":14.747566999998526,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:0","item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:101","item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:102"],"persistedHandoffs":1,"prepareMs":16.924943999998504,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":7.408574000000954,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:0","item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:101","item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:102"],"persistedHandoffs":1,"prepareMs":9.08621199999834,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":103,"selected":3,"omitted":100,"elapsedMs":8.255503000000317,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":688146,"cwd":"/home/ubuntu/wt/issue-23820","revision":"d53873b6a4799e87afd63c8d288ef0089f5a3748","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:0","item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:101","item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:102"],"persistedHandoffs":1,"prepareMs":10.185886999999639,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} Five repeated HTTP response bodies (after first request): [ { "pid": 688146, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "d53873b6a4799e87afd63c8d288ef0089f5a3748", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:0", "item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:101", "item:thread:evidence23820:00b38429-b16e-4b6b-8fc8-d51f9a112bb4:102" ], "persistedHandoffs": 1, "prepareMs": 20.692294000000402, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 688146, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "d53873b6a4799e87afd63c8d288ef0089f5a3748", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:0", "item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:101", "item:thread:evidence23820:920efed3-5a8d-4b76-9a0f-6987457edf5f:102" ], "persistedHandoffs": 1, "prepareMs": 13.53076399999918, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 688146, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "d53873b6a4799e87afd63c8d288ef0089f5a3748", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:0", "item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:101", "item:thread:evidence23820:50c987a9-7ce8-4bdd-b803-310b23e4e0d5:102" ], "persistedHandoffs": 1, "prepareMs": 16.924943999998504, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 688146, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "d53873b6a4799e87afd63c8d288ef0089f5a3748", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:0", "item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:101", "item:thread:evidence23820:5cac3195-ffa9-4823-9c1e-497d1294b633:102" ], "persistedHandoffs": 1, "prepareMs": 9.08621199999834, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 688146, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "d53873b6a4799e87afd63c8d288ef0089f5a3748", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:0", "item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:101", "item:thread:evidence23820:c2489f1a-3626-42b1-8a6b-361a0e48ef46:102" ], "persistedHandoffs": 1, "prepareMs": 10.185886999999639, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 } ] === PR: 6 HTTP requests, selector ms min/median/max 0.1317/0.2217/0.5930 === [13:04:44.011] INFO (#6742): Listening on http://127.0.0.1:18420 HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.5929919999998674,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:98f0b77e-c987-4ec2-9cb5-d87ce1a46a61:0","item:thread:evidence23820:98f0b77e-c987-4ec2-9cb5-d87ce1a46a61:101","item:thread:evidence23820:98f0b77e-c987-4ec2-9cb5-d87ce1a46a61:102"],"persistedHandoffs":1,"prepareMs":3.4143680000006498,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.32415000000037253,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:0","item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:101","item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:102"],"persistedHandoffs":1,"prepareMs":7.43847999999889,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.2539130000004661,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:0","item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:101","item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:102"],"persistedHandoffs":1,"prepareMs":4.405859000000419,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.189407999998366,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:0","item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:101","item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:102"],"persistedHandoffs":1,"prepareMs":1.6371859999999288,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.1808629999995901,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:0","item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:101","item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:102"],"persistedHandoffs":1,"prepareMs":1.6816820000003645,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} HANDOFF_SELECTOR_EVIDENCE {"budget":16000,"inputMessages":103,"oversizedMessages":100,"serializedCandidates":3,"selected":3,"omitted":100,"elapsedMs":0.13169899999957124,"stack":[" at selectHistory (file:///home/ubuntu/wt/issue-23820/packages/provider-core/src/server/handoffBudget.ts:259:331)"," at Object. (file:///home/ubuntu/wt/issue-23820/apps/server/src/orchestration-v2/ContextHandoffService.ts:449:24)"," at Generator.next ()"," at ~effect/Effect/successCont (file:///home/ubuntu/wt/issue-23820/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:979:28)"]} SERVER_HANDOFF_EVIDENCE {"pid":689874,"cwd":"/home/ubuntu/wt/issue-23820","revision":"2ea956066e6f19ac7f9116ff4cf84b5c3e179135","path":"HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write","seededItems":103,"oversizedCommandOutputs":100,"outputBytesEach":32768,"budget":16000,"selected":3,"omitted":100,"selectedIds":["item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:0","item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:101","item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:102"],"persistedHandoffs":1,"prepareMs":1.828179000000091,"summaryBytes":1607,"activeProviderThreadId":null,"runs":0} Five repeated HTTP response bodies (after first request): [ { "pid": 689874, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "2ea956066e6f19ac7f9116ff4cf84b5c3e179135", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:0", "item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:101", "item:thread:evidence23820:cb57571f-d960-4705-9e07-340138c9e90e:102" ], "persistedHandoffs": 1, "prepareMs": 7.43847999999889, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 689874, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "2ea956066e6f19ac7f9116ff4cf84b5c3e179135", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:0", "item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:101", "item:thread:evidence23820:882a4c42-ff92-4a3b-9b0d-961e57039ec1:102" ], "persistedHandoffs": 1, "prepareMs": 4.405859000000419, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 689874, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "2ea956066e6f19ac7f9116ff4cf84b5c3e179135", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:0", "item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:101", "item:thread:evidence23820:a6256102-bf95-463d-b6cb-a2cc77386b66:102" ], "persistedHandoffs": 1, "prepareMs": 1.6371859999999288, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 689874, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "2ea956066e6f19ac7f9116ff4cf84b5c3e179135", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:0", "item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:101", "item:thread:evidence23820:b5622e78-fa99-4b5a-8d6f-af0337d29399:102" ], "persistedHandoffs": 1, "prepareMs": 1.6816820000003645, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 }, { "pid": 689874, "cwd": "/home/ubuntu/wt/issue-23820", "revision": "2ea956066e6f19ac7f9116ff4cf84b5c3e179135", "path": "HTTP -> EventSink.write -> SQLite projection -> ContextHandoffServiceV2.prepareProviderHandoff -> selectHistory -> EventSink.write", "seededItems": 103, "oversizedCommandOutputs": 100, "outputBytesEach": 32768, "budget": 16000, "selected": 3, "omitted": 100, "selectedIds": [ "item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:0", "item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:101", "item:thread:evidence23820:7306397b-34b4-47c9-a005-8b21e3725ff3:102" ], "persistedHandoffs": 1, "prepareMs": 1.828179000000091, "summaryBytes": 1607, "activeProviderThreadId": null, "runs": 0 } ] FRICTION process lifetime | shell-background vp process exited with the tool shell before listening | use a foreground exec session and retain its session; stop only the confirmed port owner after cwd verification. service wiring | first diagnostic route returned 500 because EventSink was absent from the request context; a separate projection read initially assumed Option | capture the actual production layer context at route construction and follow ProjectionStore's return type. revision drift | exact PR head differs from current main across many files | install and boot each exact checkout; use serialization candidate counts as direct mechanism evidence and limit timing claims. CLEANUP Owned server PIDs 684456, 686671, 688146, 689874 were stopped with SIGTERM after confirming their /proc cwd. First background shell PID exited before listening. Temporary tracked instrumentation restored and untracked route removed before worktree deletion. No merge/push/PR/comment/label/watch actions performed.