# C10 — after labelled adapter harness recording

Revision: [134aea71f0](https://git.cafe/pingdotgg/t3code/commit/134aea71f0c861f362534d7ffeab390bfdb83d42).

Environment: Linux x86_64, Node 26.12.1, Effect 4.0.5, Vitest 5.0.5. Actual adapter, mocked SDK endpoints and native event stream; no HTTP server, model call, browser, viewport, theme, DPR or font scale. Effect TestClock governs adapter dates; observation timestamps below are live UTC.

SDK `session.command` is a normal native Promise with a controlled rejection. Receipt observation delegates to the original Deferred operations. The M3 hook rejects at the moment receipt success is assigned, before receipt resumers. MaxOpsBeforeYield changes fairness on the actual MixedScheduler; no sleeps or polling. Model slug in SDK payloads is a mock identifier.

## 1. 2026-11-03T04:09:49.472Z — C10 — environment

```json
{
  "kind": "CONTROLLED ADAPTER HARNESS; actual adapter, mocked SDK and native stream; no model or HTTP server",
  "caller": "start",
  "boundary": false,
  "maxOpsBeforeYield": "default",
  "node": "v26.12.1"
}
```

## 2. 2026-11-03T04:09:49.477Z — C10 — mock session.command sent

```json
{
  "sessionID": "native-C10",
  "messageID": "msg_000000000001mnsFGikEI2ZlrtZ8Dz9wgO00hCVK",
  "command": "slow",
  "arguments": "330",
  "model": "anthropic/claude-sonnet",
  "parts": []
}
```

## 3. 2026-11-03T04:09:49.478Z — C10 — emit matching user receipt

```json
{
  "messageID": "msg_000000000001mnsFGikEI2ZlrtZ8Dz9wgO00hCVK"
}
```

## 4. 2026-11-03T04:09:49.479Z — C10 — span.end

```json
{
  "name": "OpenCode.submitPrompt",
  "exit": "success",
  "callerSettled": false,
  "submitSettled": false,
  "receiptDone": true
}
```

## 5. 2026-11-03T04:09:49.479Z — C10 — span.end

```json
{
  "name": "OpencodeAdapter.startTurn",
  "exit": "success",
  "callerSettled": false,
  "submitSettled": true,
  "receiptDone": true
}
```

## 6. 2026-11-03T04:09:49.479Z — C10 — caller.returned

```json
{
  "exit": "success"
}
```

## 7. 2026-11-03T04:09:49.479Z — C10 — reject command after caller settled

```json
{
  "callerSettled": true
}
```

## 8. 2026-11-03T04:09:49.480Z — C10 — span.end

```json
{
  "name": "opencode.session.command",
  "exit": "OpenCodeRuntimeError: \n    at catch (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/OpenCodeRuntime.ts:157:7)\n    at file:///home/ubuntu/wt/pr-27677/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:779:40\n    at opencode.session.command (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/OpenCodeRuntime.ts:158:18)\n    at OpenCode.submitPrompt (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/adapter.ts:3278:22)\n    at OpenCode.submitPrompt (definition) (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/adapter.ts:2939:37)\n    at OpencodeAdapter.startTurn (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/evidence-controls.test.ts:195:13)\n    at OpencodeAdapter.startTurn (definition) (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/adapter.ts:3124:29) {\n  [cause]: TypeError: fetch failed\n      at /home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/evidence-controls.test.ts:296:23 {\n    [cause]: HeadersTimeoutError: Headers Timeout Error\n        at /home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/evidence-controls.test.ts:296:76\n  }\n}",
  "callerSettled": true,
  "submitSettled": true,
  "receiptDone": true
}
```

## 9. 2026-11-03T04:09:49.480Z — C10 — actual adapter request-error guard evaluated

```json
{
  "receiptDone": true,
  "callerSettled": true,
  "submitSettled": true,
  "stack": "    at Proxy.isDoneUnsafe (/home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/evidence-controls.test.ts:259:21)\n    at /home/ubuntu/wt/pr-27677/packages/provider-opencode/src/server/adapter.ts:2994:24\n    at file:///home/ubuntu/wt/pr-27677/node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js:1417:96"
}
```

## 10. 2026-11-03T04:09:49.481Z — C10 — snapshot after request failure before idle

```json
{
  "turns": [
    {
      "id": "provider-turn:provider:opencode:native-turn:native-C10%3Aattempt%3Aattempt-opencode-C10",
      "providerThreadId": "provider-thread:provider:opencode:native-thread:native-C10",
      "nodeId": "node-opencode-C10",
      "runAttemptId": "attempt-opencode-C10",
      "nativeTurnRef": {
        "driver": "opencode",
        "nativeId": "msg_000000000001mnsFGikEI2ZlrtZ8Dz9wgO00hCVK",
        "strength": "weak"
      },
      "ordinal": 1,
      "status": "running",
      "startedAt": "1970-01-01T00:00:00.000Z",
      "completedAt": null
    }
  ],
  "terminalCount": 0
}
```

## 11. 2026-11-03T04:09:49.481Z — C10 — explicit no-terminal milestone before cleanup

```json
{
  "turns": [
    {
      "id": "provider-turn:provider:opencode:native-turn:native-C10%3Aattempt%3Aattempt-opencode-C10",
      "providerThreadId": "provider-thread:provider:opencode:native-thread:native-C10",
      "nodeId": "node-opencode-C10",
      "runAttemptId": "attempt-opencode-C10",
      "nativeTurnRef": {
        "driver": "opencode",
        "nativeId": "msg_000000000001mnsFGikEI2ZlrtZ8Dz9wgO00hCVK",
        "strength": "weak"
      },
      "ordinal": 1,
      "status": "running",
      "startedAt": "1970-01-01T00:00:00.000Z",
      "completedAt": null
    }
  ],
  "terminalEvents": []
}
```

## 12. 2026-11-03T04:09:49.481Z — C10 — mock session.abort

```json
{}
```

## 13. 2026-11-03T04:09:49.482Z — C10 — interrupt call returned

```json
{
  "exit": "success"
}
```

## 14. 2026-11-03T04:09:49.482Z — C10 — emit native idle after interrupt

```json
{}
```

## 15. 2026-11-03T04:09:49.482Z — C10 — turn.terminal

```json
{
  "type": "turn.terminal",
  "driver": "opencode",
  "providerThreadId": "provider-thread:provider:opencode:native-thread:native-C10",
  "providerTurnId": "provider-turn:provider:opencode:native-turn:native-C10%3Aattempt%3Aattempt-opencode-C10",
  "runOrdinal": 1,
  "status": "interrupted",
  "failure": null,
  "threadDisposition": "reusable"
}
```

## 16. 2026-11-03T04:09:49.483Z — C10 — final snapshot

```json
{
  "turns": [
    {
      "id": "provider-turn:provider:opencode:native-turn:native-C10%3Aattempt%3Aattempt-opencode-C10",
      "providerThreadId": "provider-thread:provider:opencode:native-thread:native-C10",
      "nodeId": "node-opencode-C10",
      "runAttemptId": "attempt-opencode-C10",
      "nativeTurnRef": {
        "driver": "opencode",
        "nativeId": "msg_000000000001mnsFGikEI2ZlrtZ8Dz9wgO00hCVK",
        "strength": "weak"
      },
      "ordinal": 1,
      "status": "interrupted",
      "startedAt": "1970-01-01T00:00:00.000Z",
      "completedAt": "1970-01-01T00:00:00.000Z",
      "turnTokenUsage": {
        "usageScope": "main_agent",
        "usageStatus": "unavailable",
        "hasSubagents": false
      }
    }
  ],
  "terminals": [
    {
      "type": "turn.terminal",
      "driver": "opencode",
      "providerThreadId": "provider-thread:provider:opencode:native-thread:native-C10",
      "providerTurnId": "provider-turn:provider:opencode:native-turn:native-C10%3Aattempt%3Aattempt-opencode-C10",
      "runOrdinal": 1,
      "status": "interrupted",
      "failure": null,
      "threadDisposition": "reusable"
    }
  ]
}
```

## 17. 2026-11-03T04:09:49.483Z — C10 — mock session.abort

```json
{}
```
