# Credential reissue runtime proof

Before: [3a8c250cb0](https://github.com/pingdotgg/t3code/commit/3a8c250cb0c8056f2f563091fd412fe5db809fa1). After: [9250b259cd](https://github.com/pingdotgg/t3code/commit/9250b259cd1817ea335fa5ab9655fdc053e6fa6a).

Environment: real Linux development server and Vite web client, fresh isolated databases with seeding disabled, synthetic Git workspace, Chromium at 1280 x 800 CSS pixels, light theme. A free replay agent held the parent active. The driver called the real MCP HTTP endpoint using credentials issued to that provider subprocess; no credential, receipt, or database rows were injected.

Steps on each version:

1. Create the synthetic project through HTTP and start the parent through the CLI.
2. Call `orchestrator_capabilities`, then `delegate_task` with `mode: async`, `clientRequestId: review-round-1`, and the same synthetic review task. Retry the identical call immediately.
3. Interrupt the parent, restart the actual server through its Node source watcher without changing source bytes, then explicitly continue the same parent thread.
4. Read the newly issued provider credential and retry the identical delegation. Read persisted parent activity.
5. Stop the parent after observation; take two screenshots at least 500 ms apart and confirm identical hashes.
6. After capturing the one-versus-two-child result, check a fresh request key and a second parent using the original key.

| Observation | Before | After |
| --- | --- | --- |
| Immediate retry returns original task | true | true |
| Credential changed after server restart | true | true |
| Retry after restart returns original task | false | true |
| Retry after restart returns original child | false | true |
| Persisted children before controls | 2 | 1 |
| Fresh key creates independent work | true | true |
| Another thread using same key creates independent work | true | true |

## Before: captured server responses

```json
{
  "before": {
    "stage": "before restart",
    "taskId": "node:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
    "childThreadId": "thread:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
    "retryTaskId": "node:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
    "retryReturnsOriginal": true
  },
  "after": {
    "stage": "after restart",
    "credentialChanged": true,
    "originalTaskId": "node:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
    "originalChildThreadId": "thread:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
    "retryTaskId": "node:delegated-task:command%3Amcp%3Aceea6e41-ae3a-4ef5-9cec-2b6e97752009%3Adelegate-task%3Areview-round-1",
    "retryChildThreadId": "thread:delegated-task:command%3Amcp%3Aceea6e41-ae3a-4ef5-9cec-2b6e97752009%3Adelegate-task%3Areview-round-1",
    "retryReturnsOriginalTask": false,
    "retryReturnsOriginalChild": false
  },
  "children": {
    "childCount": 2,
    "children": [
      {
        "taskId": "node:delegated-task:command%3Amcp%3A7d6e4b46-ab8f-40fd-9b77-ab85bd30b06f%3Adelegate-task%3Areview-round-1",
        "title": "Review round one"
      },
      {
        "taskId": "node:delegated-task:command%3Amcp%3Aceea6e41-ae3a-4ef5-9cec-2b6e97752009%3Adelegate-task%3Areview-round-1",
        "title": "Review round one"
      }
    ]
  },
  "controls": {
    "freshKeyIsIndependent": true,
    "otherThreadSameKeyIsIndependent": true,
    "freshKeyTaskId": "node:delegated-task:command%3Amcp%3Aceea6e41-ae3a-4ef5-9cec-2b6e97752009%3Adelegate-task%3Areview-round-2",
    "otherThreadTaskId": "node:delegated-task:command%3Amcp%3A0f349a7d-0b26-400b-a75a-80a3e38632a2%3Adelegate-task%3Areview-round-1"
  }
}
```

## After: captured server responses

```json
{
  "before": {
    "stage": "before restart",
    "taskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "childThreadId": "thread:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "retryTaskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "retryReturnsOriginal": true
  },
  "after": {
    "stage": "after restart",
    "credentialChanged": true,
    "originalTaskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "originalChildThreadId": "thread:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "retryTaskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "retryChildThreadId": "thread:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
    "retryReturnsOriginalTask": true,
    "retryReturnsOriginalChild": true
  },
  "children": {
    "childCount": 1,
    "children": [
      {
        "taskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-1",
        "title": "Review round one"
      }
    ]
  },
  "controls": {
    "freshKeyIsIndependent": true,
    "otherThreadSameKeyIsIndependent": true,
    "freshKeyTaskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253A7e8fe2ca-1613-4059-a11b-3e2b61e9257b%3Adelegate-task%3Areview-round-2",
    "otherThreadTaskId": "node:delegated-task:command%3Amcp%3Athread%253Amcp%253Ada23db68-57ca-485e-979e-f8e84d1c6c5a%3Adelegate-task%3Areview-round-1"
  }
}
```

Limit: this proves delegation over real MCP transport, credentials, orchestration and persistence with replay provider execution. It does not exercise a live Codex runtime, OAuth client namespaces, pre-upgrade receipts, or every other MCP mutation.

The scenario runner was attempted twice and did not reach the comparison: project setup timed out and browser pairing remained at the splash screen. The verdict above comes from the manual runtime reproduction and captures.

AI-assisted; verified with the tests and tools listed above.
