Skip to content

Repo Task marked 'completed' when agent exits cleanly without opening a PR #433

Description

@jonwiggins

Observed during end-to-end testing. Task `1340f158` ran against focus_center with this prompt:

Search the codebase for any references to the URL path `/api/workflows` (in JS/TS code, config files, docs) and update them to `/api/jobs`. Keep the change minimal. Open a PR with a clear title and description.

The agent:

  • Cloned the repo ✓
  • Found `/api/workflows` references in 4 files ✓
  • Edited them ✓
  • Staged changes with `git add` ✓
  • Exited cleanly

Task transitioned: `pending → queued → provisioning → running → completed` with `Agent completed successfully` as the result. No PR was ever opened (`prUrl: null`). The state machine doesn't distinguish "agent exited clean AND PR opened" from "agent exited clean AND no PR."

A Repo Task without a PR is almost always a failure from the user's perspective — the work didn't ship. The UI shows success (green badge) but there's nothing to review or merge.

Options:

  1. Add a post-agent check: if a Repo Task reaches `completed` with no `prUrl`, transition to `needs_attention` with a clear error
  2. Let the state machine distinguish `completed-with-pr` and `completed-no-pr` as separate terminal states
  3. At minimum: show a warning badge on the task card when a completed Repo Task has no PR

Option 1 is probably the right call — it lets the existing `needs_attention` flow offer a "resume" that re-prompts the agent to commit + push + PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingoptioAssigned to Optio AI agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions