agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

Problems with `ao spawn --decompose`: auth crash and multiple PRs per issue

Open nikhilachale opened this issue 7 months ago • 2 comments

Problem 1: ao spawn --decompose crashes when Anthropic API key is unset

Running ao spawn <issue> --decompose without ANTHROPIC_API_KEY set crashes the entire process instead of failing gracefully.

Reproduction

ao spawn 843 --decompose

Actual behavior

✗ Could not resolve authentication method. Expected either apiKey or authToken to be set.

Notes

  • The decomposition path currently depends on Anthropic authentication being present in the environment.
  • In practice this means --decompose can hard-fail before a session is created when the key is missing.
  • The current behavior is abrupt and gives no fallback behavior for users who can otherwise use ao spawn successfully.

Problem 2: ao spawn --decompose creates multiple branches and PRs for one issue

When ao spawn --decompose splits a single issue into subtasks, each leaf agent creates its own branch and PR.

Observed behavior

For one issue, the decomposition flow can produce multiple PRs such as:

Issue #42 → PR #101 (feat/42-ao-1)
          → PR #102 (feat/42-ao-2)
          → PR #103 (feat/42-ao-3)

Why this is a problem

  • Multiple PRs are linked to one issue, which makes issue tracking messy.
  • Reviewers have to review several PRs in the correct order.
  • Merges become sequential and brittle because later PRs can depend on earlier ones landing cleanly.
  • Git history for one issue ends up fragmented across multiple branches.

nikhilachale avatar Apr 08 '26 15:04 nikhilachale

Image

nikhilachale avatar Apr 08 '26 15:04 nikhilachale

@harsh-batheja this flag was added in https://github.com/ComposioHQ/agent-orchestrator/pull/365

Is it needed? Can we revert everything in the PR that's not needed?

OrcInc avatar Apr 08 '26 17:04 OrcInc