Skip to content

feat(fleet): shift executor mode — launch + shepherd OpenCode sessions for opencode-lane tasks (OpenCode-half step 2) #1655

Closed

Description

@dezren39

Part of the OpenCode-half redesign (design: files/opencode-half-redesign-2026-10-28.md in the keep-the-four-repos-healthy goal workspace; tracking: #1425). Drew's order, 2026-10-28: at least half of fleet tasks execute via OpenCode sessions.

Scope

Executor mode for queue shifts: when a claimed task's recorded lane is opencode, the shift launches and shepherds an OpenCode session instead of working the task itself.

  • Depends on: feat(fleet): attach-first opencode client helper — forward lifecycle, service discovery, stdin-safe run wrapper #1357 (attach-first opencode client helper — the launch/poll surface) and the claim-time lane assignment (companion issue: ledger + lane verb in repo-queue.py).
  • The shift keeps every current duty: claim, revalidation, hard-stop labels, label sync, laptop worktree under ~/git/fleet/, branch convention, heartbeats, checkpoints, verification against fresh GitHub state, and the terminal verb. The session never touches the queue helper.
  • Launch: one session per task on the laptop server via the helper, directory = the task worktree, model per the provider registry POOL MAP ladder under the ≤60-min measurement gate (workhorse default DeepSeek Flash high; Meta only via the meta provider; never muse/*; claude-code pause stays). Prompt = assignment packet (issue, acceptance criteria, branch, repo AGENTS.md rules, PR/CI discipline, completion contract).
  • Shepherding: poll the session; answer its questions from packet/issue context; stall → one "Continue." nudge; error-stop → one retry, one failover per the ladder, then fallback.
  • Fallbacks execute directly and are recorded with a reason (server_unreachable, helper_error, session_create_failed, quota, saturated, laptop_load, session_failed). Concurrency cap for queue-spawned sessions: 4 fleet-wide during the pilot.
  • Instruction + job-body text changes land through Drew's review of the quoted drafts (standing hold on job-body edits) — this issue implements them once approved; it does not pre-empt that review.

Acceptance criteria

  • On the code queue, an opencode-assigned task produces a session whose work the shift verifies and completes with the standard structured result plus the execution block (lane, session_id, model).
  • CI-pending tasks park with the session id recorded and reattach (or continue in the same worktree) on resume.
  • Every fallback in a one-week pilot window carries a recorded reason; zero unrecorded fallbacks found by spot audit.
  • Zero evaporated claims attributable to session death (the shift's heartbeat/terminal discipline is unchanged).
  • Pilot report after one week on the code queue: executed share, miss breakdown, session failure classes.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    source/humanFiled directly by a human
    area/infraInfrastructure, deployment, and operations
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

  4. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Status — owner order 2026-10-28, stalled, re-surfaced 2026-10-31 (supersession check vs #2132).

    The Oct-28 left-on-the-ground audit owed this step a supersession check against the session-conductor issue #2132 (filed 2026-10-29) before re-dispatch. Verdict, 2026-10-31:

    NOT superseded by #2132. #2132 (and its implementation follow-on #2153) merge the OpenChamber dispatcher + babysitter jobs into one conductor. They do not touch queue-shift behaviour at all — this step is about the queue lanes' own executor mode (a claimed opencode-lane task is executed by launching + shepherding an OpenCode session from the shift), which no part of #2132/#2153 covers.

    Queue state, verified by direct read 2026-10-31: this step already has a live triage task — task 2623 (repo-health-code-pilot, queued, priority 70, attempts 0/3). Its dependencies are in place (step 1, #1654, is closed; the attach-first helper #1357 is closed). No duplicate packet was enqueued; the stall is queue position, not a missing row. Leaving this note so the next lane treats the step as live, in-scope work under Drew's 2026-10-28 order (at least half of fleet tasks execute via OpenCode sessions).

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 2, 2026
  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Claimed as queue task 2623 (triage). Verifying executor-mode state against current main, then routing or closing with evidence.

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Triage verdict: SUPERSEDED by #3026 (closed 2026-11-02, stand-down executed)

    This issue proposes shift-side executor mode (the shift itself launches + shepherds an OpenCode session for opencode-lane tasks). That direction was retired today by #3026 "Move opencode executions to laptop-side scheduled tasks — retire the Muse boot handoff":

    Remaining work is already tracked elsewhere: supervision #1656 (open, blocked), measurement #1657 (open, blocked). No new follow-up packet from this triage. Closing as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/infraInfrastructure, deployment, and operationseffort/lLarge: multi-day or open-ended; expect staged check-inskind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/highImportant and time-sensitivesource/humanFiled directly by a human

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions