Orchestration V2 · Fix And Verification

The Reused-Agent History Now Survives Reloads

The branch now keeps every activation of the same Codex or Claude subagent as a separate work-log entry, restores the latest activation correctly, and removes a mobile action that pointed at a thread the client cannot open.

feat/orchestration-v2-agent-observability Focused checks pass Web verified after reload iPhone verified Pushed in 5f84c3453

What Was Broken

01

Repeated activations shared one item ID

A follow-up sent to an existing subagent could overwrite or collapse the earlier work-log row.

02

Resume hydration could select stale state

The server could restore the wrong work item and could adopt subagents from another provider instance.

03

Mobile exposed a dead action

Subagent rows showed “Open” even though provider-native subagents do not have an app thread to navigate to.

What Changed

Activation-scoped records

Codex and Claude now allocate a fresh turn-item identity for activation 2 and later, including their progress and result records.

Safe resume selection

Hydration chooses the latest activation’s work item, filters by driver and provider instance, and limits concurrent reads to eight.

Honest mobile navigation

Only real thread and fork rows get an “Open” action. Subagent activity remains visible as status and output.

Web Proof

T3 Code web thread showing two completed activations of the same proof agent after reload
Fresh disposable environment, captured after the second run completed and the page was reloaded.
  1. 1
    The same identity, /root/proof_agent, appears in both work-log rows.
  2. 2
    The first activation keeps its own completed row and ROOT_PROOF_ONE result.
  3. 3
    The follow-up keeps a second completed row and ROOT_PROOF_TWO result.
  4. 4
    The different token totals, 20.9k and 22.3k, show these are two separate persisted activations, not a duplicated view.

Database Proof

ActivationRunTurn item identityStatus
1ordinal:1native-item:call_…Completed
2ordinal:2native-item:call_…:activation:2Completed

The screenshot proves the rendered result. The isolated SQLite projection proves both rows have distinct persisted identities and map to separate runs.

iPhone Proof

T3 Code iPhone thread showing the reused proof agent row without an Open button
iPhone 17 Pro simulator using the same disposable server and thread as the web proof.

The row tells the truth now

/root/proof_agent · Codex · gpt-5.6-sol remains visible with the second result. The invalid “Open agent thread” button is absent.

  1. 1
    The prompt explicitly reuses the exact existing agent.
  2. 2
    The result is ROOT_PROOF_TWO, proving the follow-up finished.
  3. 3
    The semantic UI assertion also found zero elements named “Open agent thread.”

Automated Verification

ScopeResultWhat It Covers
Server focused suites141 passedCodex, Claude, turn start, projection replay
Server orchestration matrix295 passed · 1 known baseline failureBroad orchestration regression pass
Web81 passedTimeline grouping and repeated activation rendering
Mobile46 passedWork-log labels, presentation, and navigation eligibility
Shared packages7 passedSupporting contract and runtime behavior
Typecheck, lint, formatCleanAll touched scopes

Remaining Outside This Fix

One pre-existing replay test still fails in the larger server matrix. A separate app-owned delegated-thread reuse gap also remains. Neither issue is caused by these changes, and neither invalidates the provider-native Codex and Claude activation path proven above.