Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(orchestration-v2): add subagent observability #4551

Closedshivamhwp(GitHub profile, opens in a new tab)wants to merge 7 commits intot3code/codex-turn-mapping fromrefs/pull/4551/headopened View on GitHub

Showing 58 changed files with 36 additions and 2 deletions (loading 57).

x
0 of 58 viewed, 58 left
36 additions and 2 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.tsModified
View file
@@ -12,6 +12,7 @@
type OrchestrationV2ProviderTurn,
type OrchestrationV2RuntimeRequest,
type OrchestrationV2Subagent,
+ type OrchestrationV2SubagentActivation,
type OrchestrationV2TurnItem,
type OrchestrationV2UserInputQuestion,
type ProviderApprovalDecision,
@@ -66,6 +67,7 @@
makeSubagentConversationArtifacts,
subagentThreadTitle,
} from "../SubagentProjection.ts";
+import { defaultSubagentRole, subagentActivationId } from "../SubagentObservability.ts";
import {
ProviderAdapterEnsureThreadError,
ProviderAdapterForkThreadError,
@@ -1926,6 +1928,12 @@
const turnItemOrdinal =
existing?.turnItemOrdinal ?? (yield* resolveItemOrdinal(context, nativeTaskId));
const taskStatus = update.status;
+ const activationId = subagentActivationId(nodeId, 1);
+ const settled =
+ taskStatus === "completed" ||
+ taskStatus === "failed" ||
+ taskStatus === "cancelled" ||
+ taskStatus === "interrupted";
const task: OrchestrationV2Subagent = {
...(existing?.task ?? {