Skip to content

agent_send reply mishandles parallel and chain background lanes #183

Description

@quifox

What happened?

agent_send replies do not behave correctly for multi-task background lanes.

For a completed parallel or chain lane, reply restarts the lane with the original tasks/chain still present, so the new reply prompt is ignored by mode selection and the original work runs again. For a running parallel lane, reply only targets the base sessionId, so sibling child sessions such as sessionId-1 do not receive it.

This conflicts with the documented agent_send behavior that replies continue the lane's existing transcript. I reproduced both cases on clean main @ adcf37b in core subagent tests, without external extensions. I have a local fix and regression tests ready and would like to submit a PR.

Steps to reproduce

  1. Start a background parallel lane:
    {
      "tasks": [
        { "agent": "general", "task": "A" },
        { "agent": "general", "task": "B" }
      ],
      "run_in_background": true,
      "alias": "lane"
    }
  2. Wait for it to complete.
  3. Send agent_send with action: "reply" and prompt C.
  4. The original A/B tasks run again; C is not delivered as the new turn.
  5. The same completed-lane behavior reproduces with chain.
  6. While a parallel lane is still running, a reply reaches the base child but not sibling sessionId-N children.

Expected behavior

A reply should continue the existing lane transcript with the new prompt, preserve the lane topology, and not silently rerun the original prompt. Running parallel replies should not be delivered to only part of the lane.

Version

main @ adcf37b / @step-harness/coding-agent 0.84.4

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

    area/agentsrc/agentbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions