Skip to content

WorkflowRunner: force-released agent treated as successful step completion #498

Description

@jahala

Problem

When an agent is force-released after idle nudging, the runner treats the step as successfully completed with a stub output string.

runner.js ~L2104-2108:

exitResult==='released'
? 'Agent completed (force-released after idle nudging)'
: `Agent exited (${exitResult})`

This string becomes the step's output. Downstream steps that depend on {{steps.X.output}} receive "Agent completed (force-released after idle nudging)" as input — which is garbage.

The step is marked completed, not failed, so the retry loop is never triggered.

Suggestion

Force-release should throw an error in the step execution path, triggering the existing retry loop:

if(exitResult==='released'){thrownewError('Agent force-released after idle timeout — step did not complete');}

If retries are available, the step retries (ideally with the failure context from issue #497). If retries are exhausted, the step fails with a clear error. Downstream steps are skipped per the error handling strategy — not fed garbage.

Location: spawnAndWait in runner.js, where exitResult is handled after the idle nudging loop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions