Skip to content

Commit 5f7e670

Browse files
committed
fix: reset directive state after workflow run
Ensure directive state is properly reset by calling resetDirective after workflow execution completes
1 parent e571bc6 commit 5f7e670

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/workflows/step/hooks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { handleTriggerLogic } from '../directives/trigger/index.js';
1515
import { handleCheckpointLogic } from '../directives/checkpoint/index.js';
1616
import { handleErrorLogic } from '../directives/error/index.js';
1717
import { handlePauseLogic } from '../directives/pause/index.js';
18+
import { resetDirective } from '../directives/reader.js';
1819
import type { WorkflowEventEmitter } from '../events/index.js';
1920
import { type ModuleStep, type WorkflowTemplate, isModuleStep } from '../templates/types.js';
2021
import { getUniqueAgentId } from '../context/index.js';
@@ -307,6 +308,7 @@ export async function afterRun(options: AfterRunOptions): Promise<AfterRunResult
307308
});
308309

309310
emitter.clearCheckpointState();
311+
await resetDirective(cwd);
310312

311313
if (checkpointAction === 'quit') {
312314
emitter.setWorkflowStatus('stopped');

0 commit comments

Comments
 (0)