fix(server): isolate Claude workflow runs #25745
ClosedBil0000(GitHub profile, opens in a new tab)wants to merge 4 commits into
main fromrefs/pull/25745/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts line 5573Resolvedby Bil0000(GitHub profile, opens in a new tab)@@ -5567,7 +5567,5 @@55675567 ...workflow,55685568 agents: workflow.agents.map((member) => ({55695569 ...member,5570- childThreadId: idAllocator.derive.threadFromProviderThread({5571- driver: CLAUDE_PROVIDER,5572- nativeThreadId: `${coordinatorChildThreadId}:agent:${member.index}`,5573- }),5570+ childThreadId:5571+ member.childThreadId ??
- apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts lines 5572 to 5577Resolvedby Bil0000(GitHub profile, opens in a new tab)@@ -5567,7 +5567,9 @@55675567 ...workflow,55685568 agents: workflow.agents.map((member) => ({55695569 ...member,5570- childThreadId: idAllocator.derive.threadFromProviderThread({5571- driver: CLAUDE_PROVIDER,5572- nativeThreadId: `${coordinatorChildThreadId}:agent:${member.index}`,5573- }),5570+ childThreadId:5571+ member.childThreadId ??5572+ idAllocator.derive.threadFromProviderThread({5573+ driver: CLAUDE_PROVIDER,5574+ nativeThreadId: `${coordinatorChildThreadId}:run:${workflow.runHandles?.runId ?? "unknown"}:agent:${member.index}`,5575+ }),
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
Bil0000(GitHub profile, opens in a new tab) changed the title
- apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts line 6054Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -6031,3 +6034,18 @@60316034 ) {60326035 return;60336036 }6037+ const previousWorkflowLaunchToolUseId =6038+ existingSubagent?.workflowLaunchToolUseId ?? existingSubagent?.runToolUseId;6039+ const workflowToolUseId =6040+ input.reopen === true &&6041+ input.toolUseId !== undefined &&6042+ findToolCall(input.context, input.toolUseId)?.toolName === "SendMessage"6043+ ? previousWorkflowLaunchToolUseId6044+ : input.toolUseId;6045+ const newWorkflowLaunch =6046+ existingSubagent?.task.workflow !== undefined &&6047+ workflowToolUseId !== undefined &&6048+ previousWorkflowLaunchToolUseId != null &&6049+ workflowToolUseId !== previousWorkflowLaunchToolUseId;6050+ if (6051+ newWorkflowLaunch &&
juliusmarminge added labelstakeover
juliusmarminge added labelspr:in-progress
juliusmarminge assignedjuliusmarminge
juliusmarminge removed labelspr:in-progress
juliusmarminge added labelspr:needs-julius
juliusmarminge closed this
juliusmarminge removed labelspr:needs-julius
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed