Skip to content

Commit 8154226

Browse files
committed
fix(workflows): handle step abort by skipping to next step
Update abort error handling to properly skip to next step by updating agent status and sending skip event
1 parent 2a3b6b9 commit 8154226

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/workflows/step/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ export async function runStepFresh(ctx: RunnerContext): Promise<RunStepResult |
202202
return { output: stepOutput };
203203
} catch (error) {
204204
if (error instanceof Error && error.name === 'AbortError') {
205-
debug('[step/run] Step aborted');
205+
debug('[step/run] Step aborted, skipping to next');
206+
ctx.emitter.updateAgentStatus(uniqueAgentId, 'skipped');
207+
ctx.machine.send({ type: 'SKIP' });
206208
return null;
207209
}
208210

0 commit comments

Comments
 (0)