diff --git a/packages/cli/src/commands/plan.ts b/packages/cli/src/commands/plan.ts index 3f5a9943..98949da7 100644 --- a/packages/cli/src/commands/plan.ts +++ b/packages/cli/src/commands/plan.ts @@ -374,7 +374,7 @@ export class PlanCommand extends Command { const plan = generator.createPlan(this.name, this.goal || 'Complete the project'); if (this.techStack) { - plan.techStack = this.techStack.split(',').map((s) => s.trim()); + plan.techStack = this.techStack.split(',').map((s) => s.trim()).filter((s) => s !== ''); } const markdown = generator.toMarkdown(plan); diff --git a/packages/core/src/plan/executor.ts b/packages/core/src/plan/executor.ts index fca2bbff..b9ab2959 100644 --- a/packages/core/src/plan/executor.ts +++ b/packages/core/src/plan/executor.ts @@ -89,6 +89,14 @@ export class PlanExecutor { // Wait if paused await this.waitIfPaused(); + // Re-check if aborted after resuming from pause + if (this.abortController.signal.aborted) { + aborted = true; + result.success = false; + result.errors = [...(result.errors ?? []), 'Execution cancelled']; + break; + } + const task = plan.tasks.find((t) => t.id === taskId); if (!task) continue; @@ -195,6 +203,12 @@ export class PlanExecutor { // Wait if paused await this.waitIfPaused(); + // Re-check if aborted after resuming from pause + if (this.abortController?.signal.aborted) { + errors.push('Execution aborted'); + break; + } + // Report progress options?.onProgress?.(task.id, step.number, `executing step ${step.number}`);