Give each workflow run a parent task with no agent

This commit is contained in:
Ian Gulliver
2026-10-21 09:02:09 -07:00
parent d062d7ccae
commit a130b9556d
23 changed files with 661 additions and 474 deletions
+3
View File
@@ -223,6 +223,9 @@ func (m *Manager) create(ctx context.Context, task api.Task, creator api.User, m
}
func (m *Manager) newSession(ctx context.Context, task api.Task, creator api.User, member, model string) (api.AgentSession, error) {
if task.Workflow != nil {
return api.AgentSession{}, fmt.Errorf("%w: task %s is a workflow run, which has no agent; its stage tasks have theirs", ErrInvalid, task.Id)
}
existing, err := m.store.ListSessions(ctx, task.Id)
if err != nil {
return api.AgentSession{}, err