fix: checkpoint store correctly initialize in multi-layered sub-workf… (#755)

This commit is contained in:
shentongmartin
2025-08-14 16:34:39 +08:00
committed by GitHub
parent c79ee64fe8
commit 3030d4d627
4 changed files with 16 additions and 9 deletions

View File

@@ -1314,7 +1314,8 @@ func (r *RepositoryImpl) WorkflowAsTool(ctx context.Context, policy vo.GetPolicy
}
var opts []compose.WorkflowOption
opts = append(opts, compose.WithIDAsName(policy.ID))
opts = append(opts, compose.WithIDAsName(policy.ID),
compose.WithParentRequireCheckpoint()) // always assumes the 'parent' may pass a checkpoint ID
if s := execute.GetStaticConfig(); s != nil && s.MaxNodeCountPerWorkflow > 0 {
opts = append(opts, compose.WithMaxNodeCount(s.MaxNodeCountPerWorkflow))
}