Skip to content

feat(keeper): binding-aware supervision for queue-spawned OpenCode sessions (OpenCode-half step 3) #1656

Open

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

Make keeper (jules-review) and babysitter (openchamber-babysitter) supervision explicitly binding-aware for queue-spawned OpenCode sessions:

  • Sessions launched by queue shifts carry a binding (session id ↔ task id ↔ issue) recorded in the task's progress at launch. The babysitter's rounds already enumerate every session at the laptop location; add the queue binding to its per-session record so queue sessions are distinguishable from dispatcher-launched and interactive ones.
  • Keeper retry/failover rules apply to queue sessions (error-stopped: one retry, then model failover per the registry ladder) — but question-answering does NOT: a queue session waiting on a question is reported to its owning shift's lane, never answered by the keeper (the shift owns the packet context and the claim).
  • Intervention caps: queue-session interventions are counted separately in the keeper state file so a burst of queue-session failures cannot silently consume the whole run's intervention budget; overflow is reported, not dropped.

Acceptance criteria

  • Babysitter round output identifies queue-spawned sessions with their task/issue binding for 100% of sessions launched under the executor mode.
  • An error-stopped queue session receives the standard retry/failover treatment and the intervention is logged with its binding.
  • A queue session waiting on a question is never answered by the keeper; it appears in the keeper report as owned-by-shift.
  • Keeper state separates queue-session interventions from Jules/OpenChamber ones.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    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).

    Verdict of the owed supersession check, 2026-10-31:

    NOT superseded by #2132 — partial overlap on one surface only. #2132 / its implementation #2153 merge the OpenChamber dispatcher + babysitter into the session conductor, so the babysitter-facing half of this step (per-session records on supervised sessions) will land in the conductor after cutover, not in the retiring babysitter job. Everything else in this step is outside #2132/#2153's scope and still owed:

    • queue-spawned sessions carrying a binding (session ↔ task ↔ issue) recorded in the task's progress at launch;
    • keeper (jules-review) retry/failover rules applied to queue sessions, with the explicit rule that a queue session's questions are never answered by the keeper (the owning shift answers them);
    • queue-session interventions counted separately in the keeper state file, with overflow reported rather than dropped.

    Queue state, verified by direct read 2026-10-31: live triage task 2619 (repo-health-code-pilot, queued, priority 50, attempts 0/3). No duplicate packet enqueued. Triage note: read #2153's current state first and aim the babysitter-facing piece at the conductor.

  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), since 2026-11-01. Picked up queue task 2619 for triage; validating the live issue and current main before routing a scoped follow-up or closing with evidence.

  6. 74 remaining items

  7. dezren39 commented on Nov 13, 2026

    @dezren39
    MemberAuthor

    Steer applied 2026-11-13 under Drew's order "fix all fixable and reblocked": Drew's recorded answer (ac3-rule-conflict-1656) applied — queue task(s) released to the queue to execute it. Set: decisions-2026-11-13-blocked-review.

  8. dezren39 commented on Nov 13, 2026

    @dezren39
    MemberAuthor

    Agent note — Drew's ruling applied; issue re-scoped (task 13666, lane any-d, 2026-11-13)

    • The ruling (verified in the pending-questions ledger, item ac3-rule-conflict-1656, answered 2026-11-12T19:47Z): the Conductor decided-context rule wins. Someone needs to answer; it matters most that sessions are not blocked, with a light preference for whoever is closest to the session. AC3 as written in this issue (a queue session waiting on a question is never answered by the keeper, only reported as owned-by-shift) is superseded.
    • Criterion 3 is therefore rewritten: a queue-spawned session waiting on a question gets answered by whoever holds the decided context — the conductor pattern — with the light closest-to-the-session preference; it is not left blocked pending its owning shift. This is already the live behavior of the only live conductor: the orchestration-pass job body directs it to answer every waiting OpenCode session whose answer is fully determined by recorded context and to instruct it to continue (verified by direct read-back of the current job definition this week). No instruction surface still encodes the old never-answer rule (searched current main and the fleet instruction files this shift: no match).
    • Remaining criteria re-scoped: criteria 1, 2, and 4 (babysitter binding records, keeper retry/failover logging with binding, separate queue-session intervention budget) name the keeper (jules-review) and the babysitter as their components. Neither exists in the current scheduler (verified this shift: no jules-review, babysitter, or keeper schedule, enabled or disabled), and the keeper state file is retired. There is no live component to implement them in, so no fix packet is enqueued — that would be phantom work against retired jobs. If a keeper/babysitter is reinstated, this issue's criteria 1/2/4 (with criterion 3 as rewritten above) are its binding-aware spec.
    • Disposition: task 13666 completes as triaged with the ruling applied. Issue feat(keeper): binding-aware supervision for queue-spawned OpenCode sessions (OpenCode-half step 3) #1656 stays open as the standing spec for a future keeper/babysitter reinstatement; the user/review label is removed (reviewed and handled here). Nothing waits on Drew — his answer is recorded above and was never re-asked.
  9. removed
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    on Nov 13, 2026
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task 18126 (repo-health-code-pilot, lane code-e)

    Bulk-intake re-triage verification, 2026-11-17.

    Fresh state checked this run: issue #1656 is OPEN, labels kind/feature, task/triage, priority/normal, effort/m, design/opencode-half, epic/opencode-platform. No status/needs-triage and no held, user/owned, do-not-merge, or do-not-auto-edit label.

    Verdict: the triage of record stands - task 13666 (2026-11-13, lane any-d), which applied Drew's ruling from pending-decisions item ac3-rule-conflict-1656 (answered 2026-11-12): criterion 3 was rewritten to the conductor decided-context rule (a waiting queue-spawned session gets answered by whoever holds the decided context, closest-to-the-session preferred), which is already the live orchestration-pass behavior; criteria 1, 2, and 4 name the keeper/babysitter components, neither of which exists in the current scheduler, so no fix packet exists to enqueue - it would be phantom work against retired jobs.

    Disposition unchanged: issue #1656 stays OPEN as the standing binding-aware spec if a keeper/babysitter is ever reinstated (criteria 1/2/4 plus criterion 3 as rewritten). Nothing waits on Drew; his answer is recorded on this issue and is not re-asked.

    Completing task 18126 as triaged, naming the existing record. No follow-on packet.

  11. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · duplicate bulk-intake triage confirmed — task 19533 (lane code-a)

    • Fresh state (2026-11-17): feat(keeper): binding-aware supervision for queue-spawned OpenCode sessions (OpenCode-half step 3) #1656 OPEN, labels unchanged (kind/feature, design/opencode-half, epic/opencode-platform, priority/normal, effort/m; no hard-stop labels); no comments since task 18126's re-verification today (note 6935384616).
    • The triage of record stands: task 13666 applied Drew's ruling (pending-decisions item ac3-rule-conflict-1656, answered 2026-11-12) — criterion 3 rewritten to the conductor decided-context rule, already the live orchestration-pass behavior; criteria 1/2/4 name keeper/babysitter components that do not exist in the current scheduler, so there is no fix packet to enqueue (it would be phantom work against retired jobs). The issue stays open as the standing binding-aware spec if a keeper/babysitter is ever reinstated. Drew's answer is recorded here and is not re-asked.
    • No follow-on. Task 19533 completes as triaged (already routed).
  12. removed their assignment
    on Nov 20, 2026
  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress
    by: agent felix (kind muse, Muse sandbox seat)
    at: 2026-11-22

    Evidence update from the #2140 reconciliation today: the babysitter round engine landed on main today — PR #12687 (babysitter.py verdict rounds, #1338), PR #12688 (stall nudges, #1187), PR #12689 (quota pool-state feed, #1338).

    Relevant to this issue's AC1: babysitter.build_bindings builds a session -> {task_id, queue, issue_number, repo} binding from the queues' claimed rows (the broker rich read), and round records carry the binding for bound sessions; unbound sessions are enumerated as observed, never driven. That is the binding-on-the-per-session-record mechanism AC1 asks for, now in code on the conductor-side stack (this issue was re-scoped to the live conductor on 2026-11-13 under Drewry's ac3-rule-conflict-1656 ruling).

    Not covered by today's landings: AC2 (keeper retry/failover for error-stopped queue sessions, logged with binding) and AC4 (keeper state separating queue-session interventions with their own budget/overflow). AC3 as written was superseded by the 2026-11-12 ruling. Discharging this issue remains its own call; this note only records that the AC1 substrate now exists.

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked-up
    by: Lane DQ (archer seat, scale-up lane per Drew's 2026-11-22 order to run 6–12 lanes)

    Picked up via fleet agent next (shortlist rank 5, dep-chain head). Premise check: issue OPEN; felix's 2026-11-22 evidence note stands — AC1 substrate landed (PRs #12687/#12688/#12689), AC3 superseded by Drew's 2026-11-12 ruling (ac3-rule-conflict-1656). No live claim on the issue.

    Slice this lane: AC4 — keeper state separates queue-session interventions. In the current stack the interventions are nudges.py's actuations (nudges + escalations over babysitter verdicts); nudge-state.json counts nothing in aggregate and there is no run budget separation. Landing: per-class intervention counts (queue-bound vs unbound/observed) persisted in nudge-state.json and reported per round, a per-round cap on queue-class interventions, and overflow reported in the round record and deferred (episode state carried, re-planned next round) — never dropped.

    AC2 (retry/failover treatment for error-stopped queue sessions) remains after this slice; #1656 stays open.

  15. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress — AC4 slice PR open
    by: Lane DQ (archer seat)

    PR: #12859 — binding-aware intervention accounting in nudges.py (per-class counts in nudge-state.json, per-round queue-intervention cap, overflow reported + deferred). Verification: 5 new tests pass, all 5 fail against origin/main's nudges.py (negative control), full hermetic suite 208 tests OK. Merging on the strength of that verification; #1656 stays open for AC2.

  16. added a commit that references this issue on Nov 23, 2026
  17. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged — AC4 landed
    by: Lane DQ (archer seat)

    Slice landed: PR #12859 merged — AC4 (keeper state separates queue-session interventions) now holds in the live stack.

    • PR: feat(claimant): binding-aware intervention accounting in nudges (#1656 AC4) #12859, merge commit b9c74ef4d377981ec3d2f6214c1c798dd3c1573e, verified on main (nudges.py carries MAX_QUEUE_INTERVENTIONS_PER_ROUND / split_plan).
    • What landed: nudge-state.json carries cumulative per-class counts (queue {nudges, escalations} vs other {observed}) alongside the episodes; only applied actuations count; queue-class interventions capped at 10/round with overflow reported in the round record (overflow, detail: over_queue_cap) and deferred with episode state untouched — least-served-first, so deferral never starves. The nudge-step record gains interventions + overflow in live and shadow modes.
    • Verification: 5 new TestInterventionAccounting tests pass; all 5 fail against origin/main's nudges.py (negative control); full hermetic suite 208 tests OK.

    Acceptance state of #1656 after this slice: AC1 substrate landed 2026-11-22 (PRs #12687/#12688/#12689, felix's evidence note); AC3 superseded by Drew's 2026-11-12 ruling (ac3-rule-conflict-1656); AC4 landed here. AC2 remains — an error-stopped queue session receives the standard retry/failover treatment, logged with its binding. That is the named next slice; #1656 correctly stays open for it. (Note for the #1658 resume gate: it needs #1656 + #1657 both closed, so AC2 is now the long pole on this side.)

    Also this pass, for the record: the lane was first handed #12228 and stood down — criteria 1–2 verified PASS by prior lanes, criterion 3 is a soak observation due 2026-11-29, and the one code-shaped remainder (cross-route failover under Drew's 2026-11-22 decision) carries felix's live claim from 2026-11-23T03:12Z. No competing work was started there.

  18. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note — AC2 slice PR open

    PR: #12879

    After this PR, an expired queue task whose bound OpenCode session ends with an error-class outcome (error, failed, failure, timeout, or timed_out) is classified as error-stopped; supervision verifies the lease, deletes the failed session, compare-clears the queue binding, and records the task/queue/issue/repo binding plus requeued_retry in the fire log. The next fire re-launches the task through its recorded route/failover ladder. Attempts-exhausted tasks keep the existing terminal-fail path.

    Evidence on branch d41a9ee61f4: 47 babysitter/nudge tests pass; 12 claimant supervision tests pass; Python compilation and git diff --check pass. The complete claimant file's live-fire tests require the local OpenCode HTTP endpoint, which was unavailable in this environment.

    AC1 substrate and AC4 remain as previously recorded; AC2 is the remaining implementation slice for this issue until this PR merges.

  19. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note — AC2 merged

    PR #12879 merged. Merge commit and current main verification are recorded by GitHub; the merged slice classifies expired error-stopped queue sessions, performs verified delete + atomic compare-clear, and logs the binding/requeued retry. AC2 is now landed for #1656. The remaining issue scope is only the already-recorded AC1/AC4 follow-up state and any future re-scope beyond this slice.

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

    area/infraInfrastructure, deployment, and operationsdesign/opencode-halfDesign: opencode-half - all issues of this effort carry iteffort/mMedium: expected under 1 day of workepic/opencode-platformReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions