Repository navigation
fix: stop showing finished T3 Code subagents as waiting - #21
Conversation
T3 Code's migration 62 (ThreadFailureLookupIndex) only adds a partial index on orchestration_v2_projection_turn_items, which neither agent reads. Both agents read live databases at migration 62 on EpicDev and Studio identically with no unread records, so the supported schema moves to 62.
A Codex subagent can ask a question and then finish its run, leaving a user_input request pending that nobody will answer. T3 Code only surfaces a subagent's pending request while the subagent's run is active, so it showed the settled parent threads as done while FleetFrog showed the subagents as waiting for you indefinitely. Both agents now read the thread's lineage from its payload and count a subagent as waiting only while it has an active run. A thread payload without lineage is unreadable, as T3 Code's own schema requires it.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-t3-subagent-waiting.fleetfrog.dev, https://fix-t3-subagent-waiting-fleetfrog-website.jameswyse.workers.dev (commit c2356f0)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused correction to existing T3 Code status decoding, with matching Rust and TypeScript behavior and targeted test coverage. Supporting schema metadata, changesets, and E2E data updates are bounded and introduce no new capability or sensitive runtime surface. Notes:
You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d90948a197
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dismissing prior approval to re-evaluate c2356f0
There was a problem hiding this comment.
🟡 Changes recommended
The shared E2E fixture lacks the newly required lineage field, causing its running thread to be discarded and integration assertions to fail.
1 open finding
What changed in this PR
Corrects T3 Code thread status reporting in both agents so finished subagents no longer appear as waiting.
Changes:
- Suppress pending-request waiting status for subagents without an active run.
- Add regression cases for finished and active subagents.
- Update the supported schema to migration 62 and add release notes.
| File | Description |
|---|---|
| packages/protocol/src/domain/t3Code.ts | Updates the supported schema to migration 62. |
| apps/agent-ts/src/t3Code/readT3Code.ts | Reads lineage and adjusts subagent waiting status. |
| apps/agent-ts/src/t3Code/readT3Code.test.ts | Covers finished and active subagent states. |
| apps/agent-rs/src/t3code/mod.rs | Applies matching lineage and status handling. |
| .changeset/frank-times-wave.md | Documents the schema expectation update. |
| .changeset/clear-rice-attack.md | Documents the subagent status fix. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Schema.Struct({ worktreePath: Schema.NullOr(Schema.String) }), | ||
| Schema.Struct({ | ||
| worktreePath: Schema.NullOr(Schema.String), | ||
| lineage: Schema.Struct({ relationshipToParent: Schema.NullOr(Schema.String) }), |

Why the change
The dashboard showed T3 Code subagent threads as waiting for you long after they had finished and their parent threads were settled, and FleetFrog expected T3 Code's schema at migration 61 when T3 Code is now at 62.
Change outline
Finished subagents are no longer waiting
A Codex subagent can ask a question and then complete its run, leaving its
user_inputrequestpendingwith nobody to answer it. T3 Code only surfaces a subagent's pending request while the subagent's run is active. Both agents now readlineage.relationshipToParentfrom the thread payload and apply the same rule.Schema at migration 62
T3 Code's migration 62 (
ThreadFailureLookupIndex) only adds a partial index onorchestration_v2_projection_turn_items, which neither agent reads.export const supportedT3CodeSchema: T3CodeSchema = { - migration: 61, - name: "PullRequestReviewGuides", + migration: 62, + name: "ThreadFailureLookupIndex", };Notes
lineagenow counts as an unread record. T3 Code's own thread schema requireslineage, and every thread on both machines checked has it.Verification
pnpm verifypasses.readT3Codetest cases fail without the fix: a finished subagent with a pending question reads as Waiting.Note
Fix finished T3 Code subagents showing as waiting
lineage.relationshipToParentfield in V2 thread payloads, replacing the old worktree-path-based layout flag in the Rust decoder and addingsubagentdetection in the TypeScript decoderwaitingvalue is forced to zero, so finished subagents no longer show as waiting; active subagents and non-subagent threads keep their database-derived stateworktreePathandlineage.relationshipToParentas nullable strings; payloads missing these fields are rejectedThreadFailureLookupIndex, in t3Code.tslineagefield will now fail decoding in readT3Code.ts and mod.rsMacroscope summarized c2356f0.