fix(orchestrator): Show when a completed delegated child still has work #4793
t3code/codex-turn-mapping fromrefs/pull/4793/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
mwolson(GitHub profile, opens in a new tab) changed the title
- apps/server/src/mcp/OrchestratorMcpService.ts line 863OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -826,6 +843,21 @@843+ transfer.type === "subagent_result" &&844+ transfer.sourceThreadId === task.childThreadId &&845+ transfer.targetThreadId === scope.threadId,846+ );847+ const resultTransferForRun = (run: OrchestrationV2Run | undefined) =>848+ !canExposeTaskRunResult(run)849+ ? null850+ : (resultTransfers.find((transfer) => transfer.sourcePoint.runId === run.id) ??851+ (run.id === childRun?.id852+ ? resultTransfers.find((transfer) => transfer.sourcePoint.runId === undefined)853+ : undefined) ??854+ null);855+ const resultTransfer = resultTransferForRun(childRun);856+ const terminalStatus = terminalRun === undefined ? null : taskStatusForRun(terminalRun);826857 return {827858 taskId: task.id,828859 childThreadId: task.childThreadId,829860 childRunId: childRun?.id ?? null,830861 childNodeId: task.id,831862 status,863+ hasPendingChildRuns: childProjection.runs.some((run) => !isTerminalRunStatus(run.status)),
- apps/server/src/mcp/OrchestratorMcpService.ts line 863OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -826,6 +843,21 @@843+ transfer.type === "subagent_result" &&844+ transfer.sourceThreadId === task.childThreadId &&845+ transfer.targetThreadId === scope.threadId,846+ );847+ const resultTransferForRun = (run: OrchestrationV2Run | undefined) =>848+ !canExposeTaskRunResult(run)849+ ? null850+ : (resultTransfers.find((transfer) => transfer.sourcePoint.runId === run.id) ??851+ (run.id === childRun?.id852+ ? resultTransfers.find((transfer) => transfer.sourcePoint.runId === undefined)853+ : undefined) ??854+ null);855+ const resultTransfer = resultTransferForRun(childRun);856+ const terminalStatus = terminalRun === undefined ? null : taskStatusForRun(terminalRun);826857 return {827858 taskId: task.id,828859 childThreadId: task.childThreadId,829860 childRunId: childRun?.id ?? null,830861 childNodeId: task.id,831862 status,863+ hasPendingChildRuns: childProjection.runs.some(
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
t3dotgg(GitHub profile, opens in a new tab) added labelsvouch:trusted
t3dotgg(GitHub profile, opens in a new tab) removed labelsvouch:unvouched
mwolson(GitHub profile, opens in a new tab) changed the title
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged thisba8d91a
juliusmarminge closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
01b35af3-0ff9-4d34-b3a1-03a0248c2bf2You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share