Skip to content

[coordination] Overseer delegates a GOAL to the durable Pilot (replace the one-shot) #155

Description

@serge-ivo

Near-term build — the only near-term item in #154. Also the first slice of the delegate primitive + task record (shaped to generalize; generalized only as far as this consumer forces).

Today the Overseer's drive_claude(repoId, instruction) (routes/coding.ts) sends ONE instruction to a repo's Engine and returns a reply string — no follow-through for multi-step work.

Do:

  • Keep the direct Engine send for genuine one-shots ("run the tests").
  • For a multi-step goal, the Overseer hands it to the repo's Pilot (CodingSessionWorkflow, durable) which owns the snapshot→decide→act loop + stuck/needs_input escalation — instead of a fire-and-forget drive_claude.
  • Return a task/status handle (not just a reply string) so the coordinator can report progress. Persist it on the existing board + coding_timeline (minimal: id, repo, goal, status, result).
  • Decision point: "is this a command or a goal?" — start simple (goal = default for the Overseer's DONE path; one-shot stays for read/trivial), refine later.

Keep it minimal + Coder-scoped — this is the fix as a primitive, not a framework. Behavior for one-shots unchanged; add durable follow-through for goals. Tests: goal → Pilot started + task recorded + status transitions; one-shot path unchanged.

Design: docs/coordination-primitives.md. Part of #154.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend / Worker / API workcoordinationAgent coordination / delegation primitives

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions