Skip to content

Agent step dies instantly when the task text starts with '--' (Garden runs for #523/#524) #620

Description

@khaliqgant

What happened

Two Flows Software Garden runs failed at their first agent step within a second, with 0 tokens:

Issue Run Result
#524 "--reuse-from is refused when an already-reused step's model is unavailable…" 9029a74d-5d75-5efc-a3c1-94c5529b6b82 agent-3 worker_error after 526 ms, exit 1, 0 tokens
#523 "--reuse-from silently reuses steps whose real output is on disk…" cbf5aced-edc7-5471-8cfc-e29f83b19131 agent-3 worker_error after 585 ms, exit 1, 0 tokens

The run log's step.completed for agent-3 records "cli":"agent","model":"claude-opus-5", and the step's stderr_tail is a fragment of the issue body (the task text), not a CLI error message. Other Flows Garden runs dispatched in the same window with ordinary titles (e.g. #473, #502) ran normally and opened PRs.

Hypothesis (unconfirmed)

Both failing issues are the only ones whose title begins with -- (--reuse-from …). The task text appears to reach the agent CLI as a command-line argument, so a leading --… is parsed as an option and the CLI exits immediately. If so, any ticket whose title starts with -/-- kills the run.

Also worth checking: the step records cli: "agent" where successful runs of the same Garden record claude; confirm that is just a label.

Ask

  • Reproduce: run an agent step whose task begins with --reuse-from … through the same worker path the Cloud runtime uses.
  • Fix: never pass task text as a positional argv value that can be read as an option (pass it via stdin/a file, or after a -- end-of-options separator, whichever the CLI supports), for every supported agent CLI.
  • Regression test with a task starting with -- and with -.
  • Then the two issues above can be re-dispatched to the Garden.

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