Move lead delivery and the Merge & continue hold onto the coordinator

This commit is contained in:
Ian Gulliver
2026-10-21 13:59:37 -07:00
parent 1734057293
commit 5c50fa857f
16 changed files with 270 additions and 190 deletions
+9 -5
View File
@@ -33,16 +33,20 @@ func (m *Manager) Compact(ctx context.Context, sessionID, model string) (api.Age
if err != nil {
return api.AgentSession{}, err
}
err = m.startRunning(ctx, sess, "byre")
if err != nil {
return api.AgentSession{}, err
}
return m.launchCompaction(ctx, sess, task, model)
}
func (m *Manager) launchCompaction(ctx context.Context, sess api.AgentSession, task api.Task, model string) (api.AgentSession, error) {
prompt := handoffPrompt
if sess.Owner != "" {
prompt = leadHandoffPrompt
}
err = m.startRunning(ctx, sess, task.Id, "byre")
if err != nil {
return api.AgentSession{}, err
}
m.mu.Lock()
m.handoffModel[sessionID] = model
m.handoffModel[sess.Id] = model
m.mu.Unlock()
return m.launch(ctx, sess, task, "byre", prompt, "", "", nil)
}