Skip to content

Commit 27e9560

Browse files
waleedlatif1claude
andcommitted
fix(execution): validate child call chain instead of parent chain
Validate childCallChain (after appending current workflow ID) rather than ctx.callChain (parent). Prevents an off-by-one where a chain at depth 10 could still spawn an 11th workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6022b12 commit 27e9560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sim/executor/handlers/workflow/workflow-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class WorkflowBlockHandler implements BlockHandler {
169169
}
170170

171171
const childCallChain = buildNextCallChain(ctx.callChain || [], workflowId)
172-
const depthError = validateCallChain(ctx.callChain || [])
172+
const depthError = validateCallChain(childCallChain)
173173
if (depthError) {
174174
throw new ChildWorkflowError({
175175
message: depthError,

0 commit comments

Comments
 (0)