Skip to content

Launch and coordinate agent-native goal sessions #2010

Closed as not planned
Closed as not planned

Description

@integry

Context

Part of #2003 and #2002. The coding agent's native goal mode owns planning, progress, continuation, and completion. ProPR launches and supervises it instead of recreating those features.

Scope

Connect goal APIs to the selected provider runtime. Starting a goal creates/resumes one provider session and supplies the objective as /goal <objective> semantics.

Requirements

  • Resolve the selected agent/model, create the isolated worktree/container, start the provider session, and invoke native goal mode.
  • Persist provider session identity before reporting recoverability.
  • Observe native goal status and plan/checklist events without inventing controller nodes.
  • Deliver FIFO steering and predefined status questions to the same session.
  • Pause/resume/cancel and supported model changes at provider-native safe boundaries.
  • Recover after daemon, Redis, queue, socket, or container loss by resuming the same provider session/worktree.
  • Supply parallelism and Ultrafix settings as explicit goal policy for the coding agent.
  • Passively track issues/PRs the coding agent reports or creates and record its final epic PR.
  • Keep the final epic PR draft/unmerged for human approval.

Non-goals

  • No ProPR-generated plan/decomposition.
  • No goal-node dependency or merge scheduler.
  • No controller-created issue/sub-epic hierarchy.
  • No controller-computed status answer.
  • No separate restricted planning-only agent.

Acceptance

  • API creation demonstrably enters native goal mode for the selected provider.
  • Small goals may produce one PR; larger goals may let the coding agent create its own hierarchy through ProPR.
  • Crash/resume preserves the exact provider session/worktree.
  • Pause/resume, steering, model changes, output/checklist, and final PR association work in production composition.

Activity

  1. added
    enhancement
    base-2003-epic-goal-control-plane
    and removed on Aug 31, 2026
  2. integry commented on Aug 31, 2026

    @integry
    OwnerAuthor

    Owner planning addendum — treat these as acceptance criteria when this leaf is launched:

    • Add a durable controller supervisor/startup scan that recovers runnable goals after process/container crashes. Redis/queues may wake work but are never source of truth. Persist heartbeats and lease generations; test loss, expiry, takeover, and a stale worker attempting dispatch/GitHub writes/merge after replacement.
    • Give every planned epic/sub-epic/leaf node a deterministic durable correlation/idempotency key and reconcile GitHub issue/branch/PR/comment/label operations through an outbox. Test crash after remote success but before local commit: retry must discover/adopt the exact remote artifact rather than POST a duplicate or generate a new random branch.
    • Encode and validate the root/sub-epic/leaf parent, base branch, head branch, issue, and PR mapping explicitly, with hierarchy depth/node/cycle bounds. Serialize integration merges per target branch while retaining configured per-goal and per-repository leaf capacity; capacity and claims must survive restart/takeover.
    • Snapshot the selected parallelism and Ultrafix policy immutably per node/execution. Persist every review/fix cycle and evidence result; completion/merge gates fail closed on missing, stale, or unsuccessful evidence and are idempotent under crash/retry.
    • Add multi-controller, separate-SQLite and stub-GitHub adversarial tests for reverse completions, duplicate delivery, lease loss at each remote boundary, capacity recovery, and deterministic final epic completion.
  3. integry commented on Aug 31, 2026

    @integry
    OwnerAuthor

    Owner launch addendum — orchestration/GitHub boundary

    Implementation remains blocked on #2006/#2018 and the final #2007 runtime identity contract. Use Codex GPT-5.6 Sol only. #2010 is the single writer for plan revisions, node/attempt state, scheduling/capacity, controller ownership, GitHub reconciliation/outbox, branch/merge locks, and exact-SHA review/CI/Ultrafix evidence. #2008 owns event/message persistence and realtime; #2010 emits through its typed port. #2007 owns provider/container session execution.

    Required contract details:

    • Persist explicit versioned schemas/state machines for plans, nodes, attempts, GitHub artifacts, outbox operations, capacity reservations, branch locks, and validation evidence. One attempt_count/externalRef field is not sufficient.
    • Plan replacement is atomic and bounded: exactly one root, legal parent/kind relations, acyclic graph, deterministic IDs/order, bounded depth/node count, and no replan may discard completed or active work.
    • Support parallel attempts using a composite node/execution/attempt/session identity, including multiple simultaneous tasks on the same selected agent/provider. Do not key a runtime session only by goal+agent.
    • Define artifact mapping for epic, sub-epic, issue, and implementation PR nodes, including single-PR and all-no-code goals. Deterministic branch names and durable hidden markers must bind repository, goal, node, artifact kind, head, and base.
    • GitHub operations use a durable outbox. After ambiguous remote success, adoption must validate the full marker tuple before reuse. Labels/comments/PR state are reconciled to desired state idempotently.
    • Capacity is SQL-backed across controllers and goals with exact counted states, durable reservations, expiry/recovery, and fenced per-target-branch merge serialization.
    • One controller lease owns orchestration. Its live fence is passed into runtime/event/message operations and rechecked at dispatch, remote create/push, review, and merge effect boundaries.
    • Add durable native-goal output, steering, replay, checklist, and statistics #2008 owns message FIFO; Launch and coordinate agent-native goal sessions #2010 alone interprets status/replan/dependency actions; Introduce a thin resumable native-goal session and container contract #2007 receives only provider-directed messages.
    • Terminal rule: with auto-merge disabled, completed means the final epic PR is ready with its exact-head policy evidence; later human merge is external read-only artifact state. With auto-merge enabled, remain completing until the final merge succeeds. No authoritative goal mutation occurs after terminal state.
    • Bind CI/review/Ultrafix evidence to exact head SHA, base SHA, policy snapshot, expected check set, and cycle. Any new commit or rebase invalidates evidence and gates fail closed.

    Acceptance tests must cover multiple controllers on separate WAL connections, two goals sharing a repository, same-agent parallel attempts, crash after every GitHub side effect, hostile marker collisions, reverse-order completions, branch-lock takeover, permission loss, no-code/single-PR/nested plans, both terminal policies, and evidence invalidation. Validate combined #2008/#2010 integration in both serialized merge orders.

  4. propr-dev commented on Sep 1, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2010/gpt-5.6-sol-orchestrate-goal-decompos-20260901-2239-grt
    • Base Branch: 2003-epic-goal-control-plane
    • Worktree: issue-2010-20260901-2239-gpt-5.6-sol-grt

    🔍 Track Task Execution

  5. added a commit that references this issue on Sep 1, 2026
  6. changed the title [-]Orchestrate goal decomposition, parallel ProPR work, and epic completion[/-] [+]Launch and coordinate agent-native goal sessions[/+] on Sep 2, 2026
  7. propr-dev commented on Sep 2, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2010/gpt-5.6-sol-launch-and-coordinate-age-20260902-1505-chv
    • Base Branch: 2003-epic-goal-control-plane
    • Worktree: issue-2010-20260902-1505-gpt-5.6-sol-chv

    🔍 Track Task Execution

  8. integry commented on Sep 2, 2026

    @integry
    OwnerAuthor

    Architecture correction: the rewritten issue body and #2002 supersede every earlier orchestration/launch addendum on this issue. In particular, do not implement plan revisions, goal nodes, dependency/capacity scheduling, GitHub reconciliation/outbox ownership, branch/merge locks, or controller-derived completion. Implement only one selected provider-native /goal session and its durable launch/resume/control wiring.

  9. added a commit that references this issue on Sep 2, 2026
  10. integry commented on Sep 2, 2026

    @integry
    OwnerAuthor

    Superseded by #2071 and the simplified task-backed native /goal architecture. The unreleased branch is retained only for reference.

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

    AIAI-donebase-2003-epic-goal-control-planeenhancementllm-codex-gpt56-solpropr-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions