From d2a7dfa5fe5b4a4ed29d70fbb07a833db817968f Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Sun, 31 May 2026 09:30:08 -0400 Subject: [PATCH] disable round-robin for sequential --- README.md | 3 ++- src/executor.ts | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e18487d..853079b 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,11 @@ prompts: > tasks, only the first two models are used. The third model is only touched when > a third concurrent task starts. Freed model slots are reused before new ones > are allocated. -> > **Automatic failover**: if a provider/API is unreachable (rate limit, 503, etc.), > the task automatically cycles to the next model in the list without counting it > as a task failure. Each model is tried once before the task is marked as failed. +> **NOTE**: this is only used in parallel execution, in sequential mode the +> parent pi session's model is used ## State Files diff --git a/src/executor.ts b/src/executor.ts index 7722f0d..3e3837e 100644 --- a/src/executor.ts +++ b/src/executor.ts @@ -411,10 +411,9 @@ export async function executeBatch( return; } - // Execute sequentially + // Execute sequentially (no round-robin — inherit parent model) for (const task of tasks) { try { - const model = roundRobin?.assign(task.id); await executeTask( task, project, @@ -423,14 +422,11 @@ export async function executeBatch( ctx, sendChatMessage, projectDir, - undefined, - model, - roundRobin, ); } catch (error) { // Task failed — stop the batch. Dependent tasks are blocked by // the DAG layer (getBlockedTasks) so they won't appear in this batch. - roundRobin?.release(task.id); + const errorMsg = error instanceof Error ? error.message : String(error); progress.markFailed(task.id, errorMsg); sendChatMessage?.(`✗ ${task.id} · ${task.title} — ${errorMsg}`);