# Runtime evidence for [#32880](https://git.cafe/pingdotgg/t3code/pull/32880)

Node v26.12.1; Linux 6.8.0-117-generic x86_64; synthetic Codex home, schema per Codex 0.163.0. Installed binary: codex-cli 0.163.0.

Before [fa2f4ff2a2](https://git.cafe/pingdotgg/t3code/commit/fa2f4ff2a2bac5ac92e07749f6b83b0003d642a0); after [df3ffc1249](https://git.cafe/pingdotgg/t3code/commit/df3ffc1249ca06ef43aaebe6a534f96034354700).

The isolated Codex app-server initialized and accepted a turn, then returned 401 Unauthorized because the synthetic home has no credentials. No real Codex home was read. The fallback SQL schema was extracted from the database that codex-cli 0.163.0 created in that isolated probe. All conversations here are synthetic; no application server or live T3 state was used.

## M3-root-order: R07, R14

Root Q at position 1 is inserted before P at position 0; no direct control

Fixture: **synthetic Codex home, schema per Codex 0.163.0**. P and Q are ordinary directories. Viewport/theme: N/A. Real filesystem, subprocess runner and scanner; only settings, project-store records, host home and clock are injected.

Seed command: `python3 /tmp/lead-32880-r1/evidence-capture/seed-fixtures.py`. The fixture below records exact JSONL content, timestamps, thread assignments and root insertion order. Read-only database inspection is included in each output.

```json
{
  "name": "M3-root-order",
  "rows": [
    "R07",
    "R14"
  ],
  "description": "Root Q at position 1 is inserted before P at position 0; no direct control",
  "home": "<fakehome>",
  "now": "2026-11-10T12:00:00.000Z",
  "roots": {
    "P": "<fakehome>/code/project",
    "Q": "<fakehome>/code/other"
  },
  "files": [
    {
      "path": "<fakehome>/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl",
      "threadId": "019a5f00-0000-7000-8000-000000000007",
      "rolloutId": "019a5f00-0000-7000-8000-000000000007",
      "cwd": "<fakehome>/Documents/Codex/2026-11-08/new-chat",
      "mtimeMs": 1794311999000,
      "records": [
        "{\"timestamp\":\"2026-11-10T12:00:00.000Z\",\"type\":\"session_meta\",\"payload\":{\"id\":\"019a5f00-0000-7000-8000-000000000007\",\"cwd\":\"<fakehome>/Documents/Codex/2026-11-08/new-chat\"}}",
        "{\"timestamp\":\"2026-11-10T12:00:00.000Z\",\"type\":\"event_msg\",\"payload\":{\"type\":\"user_message\",\"message\":\"R07 position zero wins\"}}"
      ]
    }
  ],
  "assignments": [
    {
      "threadId": "019a5f00-0000-7000-8000-000000000007",
      "projectId": "019a5f00-0000-7000-8000-0000000186a1",
      "cwd": "<fakehome>/Documents/Codex/2026-11-08/new-chat"
    }
  ],
  "rootInsertionOrder": [
    {
      "projectId": "019a5f00-0000-7000-8000-0000000186a1",
      "position": 1,
      "path": "<fakehome>/code/other"
    },
    {
      "projectId": "019a5f00-0000-7000-8000-0000000186a1",
      "position": 0,
      "path": "<fakehome>/code/project"
    }
  ]
}
```

Commands, before then after:

```sh
cd /home/user/wt/pr-32880-before/apps/server
HOME='<fakehome>' CODEX_HOME='<fakehome>/.codex' T3CODE_DEV_SEED=0 /home/user/.local/share/vite-plus/js_runtime/node/26.12.1/bin/node --experimental-import-meta-resolve /tmp/lead-32880-r1/evidence-capture/scanner-driver.mjs /tmp/lead-32880-r1/evidence-capture/fixtures-2026-11-10T10-55-07.415040+00-00/M3-root-order/fixture.json before

cd /home/user/wt/pr-32880-after/apps/server
HOME='<fakehome>' CODEX_HOME='<fakehome>/.codex' T3CODE_DEV_SEED=0 /home/user/.local/share/vite-plus/js_runtime/node/26.12.1/bin/node --experimental-import-meta-resolve /tmp/lead-32880-r1/evidence-capture/scanner-driver.mjs /tmp/lead-32880-r1/evidence-capture/fixtures-2026-11-10T10-55-07.415040+00-00/M3-root-order/fixture.json after
```

Each invocation builds a warm scanner, calls scan then recent(P)/recent(Q), and builds a separate cold scanner that starts with recent(P). Additional calls retain their event order. Each invocation writes a fresh timestamped run directory; both sides consume identical fixture bytes.

<table><tr><th>Before <a href="https://git.cafe/pingdotgg/t3code/commit/fa2f4ff2a2bac5ac92e07749f6b83b0003d642a0">fa2f4ff2a2bac5ac92e07749f6b83b0003d642a0</a></th><th>After <a href="https://git.cafe/pingdotgg/t3code/commit/df3ffc1249ca06ef43aaebe6a534f96034354700">df3ffc1249ca06ef43aaebe6a534f96034354700</a></th></tr><tr><td><pre>environment
{
  &quot;side&quot;: &quot;before&quot;,
  &quot;sha&quot;: &quot;fa2f4ff2a2bac5ac92e07749f6b83b0003d642a0&quot;,
  &quot;blob&quot;: &quot;dc67bd9387e04b91fa61d34ea47929c056256796&quot;,
  &quot;node&quot;: &quot;v26.12.1&quot;,
  &quot;os&quot;: &quot;linux&quot;,
  &quot;arch&quot;: &quot;x64&quot;,
  &quot;fixture&quot;: &quot;M3-root-order&quot;,
  &quot;label&quot;: &quot;synthetic Codex home, schema per Codex 0.163.0&quot;,
  &quot;clock&quot;: &quot;2026-11-10T12:00:00.000Z&quot;,
  &quot;substitutions&quot;: [
    &quot;ServerSettings.layerTest: explicit synthetic provider homes&quot;,
    &quot;ServerConfig.layerTest: scratch-only state directory&quot;,
    &quot;ProjectStoreV2.listShells: synthetic persisted projects&quot;,
    &quot;HostProcess.HomeDirectory: synthetic home&quot;,
    &quot;Clock: fixed current time; real sleep retained&quot;
  ],
  &quot;realServices&quot;: [
    &quot;AgentSessionScanner&quot;,
    &quot;ProcessRunner&quot;,
    &quot;NodeServices FileSystem/Path/ChildProcess&quot;
  ]
}

fixture.database.readOnly
{
  &quot;home&quot;: &quot;&lt;fakehome&gt;/.codex&quot;,
  &quot;threadCount&quot;: 1,
  &quot;fixtureThreads&quot;: [
    {
      &quot;id&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;,
      &quot;cwd&quot;: &quot;&lt;fakehome&gt;/Documents/Codex/2026-11-08/new-chat&quot;,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;rollout_path&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;
    }
  ],
  &quot;rootsInInsertionOrder&quot;: [
    {
      &quot;rowid&quot;: 1,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;position&quot;: 1,
      &quot;path&quot;: &quot;&lt;fakehome&gt;/code/other&quot;
    },
    {
      &quot;rowid&quot;: 2,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;position&quot;: 0,
      &quot;path&quot;: &quot;&lt;fakehome&gt;/code/project&quot;
    }
  ]
}

warm.scanner.created
{
  &quot;instanceNumber&quot;: 1,
  &quot;distinctFromPriorInstances&quot;: true,
  &quot;firstCall&quot;: &quot;scan&quot;
}

warm.scan
{
  &quot;candidates&quot;: [],
  &quot;scannedAt&quot;: &quot;2026-11-10T12:00:00.000Z&quot;
}

warm.recent(P)
[]

warm.recent(Q)
[]

cold.scanner.created
{
  &quot;instanceNumber&quot;: 2,
  &quot;distinctFromPriorInstances&quot;: true,
  &quot;firstCall&quot;: &quot;recentThreads(P)&quot;
}

cold.recent(P)
[]

cold.recent(Q)
[]</pre></td><td><pre>environment
{
  &quot;side&quot;: &quot;after&quot;,
  &quot;sha&quot;: &quot;df3ffc1249ca06ef43aaebe6a534f96034354700&quot;,
  &quot;blob&quot;: &quot;1b32de22a8878fdf07db29403cd9cedb9692ea7d&quot;,
  &quot;node&quot;: &quot;v26.12.1&quot;,
  &quot;os&quot;: &quot;linux&quot;,
  &quot;arch&quot;: &quot;x64&quot;,
  &quot;fixture&quot;: &quot;M3-root-order&quot;,
  &quot;label&quot;: &quot;synthetic Codex home, schema per Codex 0.163.0&quot;,
  &quot;clock&quot;: &quot;2026-11-10T12:00:00.000Z&quot;,
  &quot;substitutions&quot;: [
    &quot;ServerSettings.layerTest: explicit synthetic provider homes&quot;,
    &quot;ServerConfig.layerTest: scratch-only state directory&quot;,
    &quot;ProjectStoreV2.listShells: synthetic persisted projects&quot;,
    &quot;HostProcess.HomeDirectory: synthetic home&quot;,
    &quot;Clock: fixed current time; real sleep retained&quot;
  ],
  &quot;realServices&quot;: [
    &quot;AgentSessionScanner&quot;,
    &quot;ProcessRunner&quot;,
    &quot;NodeServices FileSystem/Path/ChildProcess&quot;
  ]
}

fixture.database.readOnly
{
  &quot;home&quot;: &quot;&lt;fakehome&gt;/.codex&quot;,
  &quot;threadCount&quot;: 1,
  &quot;fixtureThreads&quot;: [
    {
      &quot;id&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;,
      &quot;cwd&quot;: &quot;&lt;fakehome&gt;/Documents/Codex/2026-11-08/new-chat&quot;,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;rollout_path&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;
    }
  ],
  &quot;rootsInInsertionOrder&quot;: [
    {
      &quot;rowid&quot;: 1,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;position&quot;: 1,
      &quot;path&quot;: &quot;&lt;fakehome&gt;/code/other&quot;
    },
    {
      &quot;rowid&quot;: 2,
      &quot;project_id&quot;: &quot;019a5f00-0000-7000-8000-0000000186a1&quot;,
      &quot;position&quot;: 0,
      &quot;path&quot;: &quot;&lt;fakehome&gt;/code/project&quot;
    }
  ]
}

warm.scanner.created
{
  &quot;instanceNumber&quot;: 1,
  &quot;distinctFromPriorInstances&quot;: true,
  &quot;firstCall&quot;: &quot;scan&quot;
}

warm.scan
{
  &quot;candidates&quot;: [
    {
      &quot;path&quot;: &quot;&lt;fakehome&gt;/code/project&quot;,
      &quot;title&quot;: &quot;project&quot;,
      &quot;sources&quot;: [
        &quot;codex&quot;
      ],
      &quot;threadCount&quot;: 1,
      &quot;lastActiveAt&quot;: &quot;2026-11-10T11:59:59.000Z&quot;,
      &quot;alreadyImported&quot;: false,
      &quot;git&quot;: null
    }
  ],
  &quot;scannedAt&quot;: &quot;2026-11-10T12:00:00.000Z&quot;
}

warm.recent(P)
[
  {
    &quot;tag&quot;: &quot;Importable&quot;,
    &quot;id&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;,
    &quot;provider&quot;: &quot;codex&quot;,
    &quot;providerInstanceId&quot;: &quot;codex&quot;,
    &quot;file&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;,
    &quot;identity&quot;: {
      &quot;filePath&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;,
      &quot;size&quot;: 393,
      &quot;mtimeMs&quot;: 1794311999000,
      &quot;device&quot;: 64769,
      &quot;inode&quot;: &quot;2075014&quot;,
      &quot;birthtimeMs&quot;: 1794308107433,
      &quot;provider&quot;: &quot;codex&quot;,
      &quot;providerInstanceId&quot;: &quot;codex&quot;,
      &quot;providerSessionId&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;
    },
    &quot;title&quot;: &quot;R07 position zero wins&quot;,
    &quot;messages&quot;: [
      {
        &quot;role&quot;: &quot;user&quot;,
        &quot;text&quot;: &quot;R07 position zero wins&quot;
      }
    ]
  }
]

warm.recent(Q)
[]

cold.scanner.created
{
  &quot;instanceNumber&quot;: 2,
  &quot;distinctFromPriorInstances&quot;: true,
  &quot;firstCall&quot;: &quot;recentThreads(P)&quot;
}

cold.recent(P)
[
  {
    &quot;tag&quot;: &quot;Importable&quot;,
    &quot;id&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;,
    &quot;provider&quot;: &quot;codex&quot;,
    &quot;providerInstanceId&quot;: &quot;codex&quot;,
    &quot;file&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;,
    &quot;identity&quot;: {
      &quot;filePath&quot;: &quot;&lt;fakehome&gt;/.codex/sessions/2026/11/10/rollout-2026-11-10T10-00-00-019a5f00-0000-7000-8000-000000000007.jsonl&quot;,
      &quot;size&quot;: 393,
      &quot;mtimeMs&quot;: 1794311999000,
      &quot;device&quot;: 64769,
      &quot;inode&quot;: &quot;2075014&quot;,
      &quot;birthtimeMs&quot;: 1794308107433,
      &quot;provider&quot;: &quot;codex&quot;,
      &quot;providerInstanceId&quot;: &quot;codex&quot;,
      &quot;providerSessionId&quot;: &quot;019a5f00-0000-7000-8000-000000000007&quot;
    },
    &quot;title&quot;: &quot;R07 position zero wins&quot;,
    &quot;messages&quot;: [
      {
        &quot;role&quot;: &quot;user&quot;,
        &quot;text&quot;: &quot;R07 position zero wins&quot;
      }
    ]
  }
]

cold.recent(Q)
[]</pre></td></tr></table>

Run receipt: both exit 0; fixture SHA-256 maps match between sides and before/after each invocation. Warm and cold stable outcomes match exactly, including source identities and messages.

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