GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session · Issue #7356 · developing-today/code

opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356

New issue
Copy link
New issue
Copy link
Closed
#7834
Closed
opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session#7356
#7834
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/design-architectFiled by the repo design architect jobstatus/needs-triageNot yet triaged; needs a first lookstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 8, 2026
Issue body actions

Summary

pm-stack/opencode-claimant/claimant.py (HEAD 9f5a92057d, restored by #7290) has the correct create → verify-location → bind ordering, but stops after bind. Step 4d builds the worker prompt as a string and never delivers it:

# claimant.py:474-489
# Step 4d: Send prompt to bound session
prompt = f"""
Execute queue task {task_id}
...
"""
# In a real implementation, this would send the prompt via the session API
# For now, we just record the successful launch
launched.append({"task_id": task_id, "session_id": session_id, ...})

There is no POST to /api/session/<id> (or any message endpoint) anywhere in launch_step. A live fire therefore creates and binds a session that never receives a prompt.

Why this is urgent now

Two things changed today:

  1. fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 merged (opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865 closed 06:31:52Z), so claimant.py again has working supervision and a live launch path.
  2. opencode-claimant(poll): repo-queue list emits a table, not JSON — every queue read fails and candidate discovery is blind fleet-wide #7325 is the only remaining gate: poll.py cannot read the queues. Once that lands, live mode stops being a no-op and starts doing this on every launch.

A bound-but-never-prompted session is exactly the state #4758's recovery rule exists to clean up. So every launch would produce one zero-message session that supervision then has to delete and reclaim 30+ minutes later — a self-inflicted oscillating loop rather than forward progress.

Also missing from the spec'd launch sequence (all zero-hit greps in claimant.py)

Spec step Required At HEAD
4c checkpoint <id> --worker <worker_id> --stage launched with session id in progress absent
4d send the queue runbook prompt to the bound session, --worker <worker_id> on every verb, terminal --execution {"lane":"opencode","session_id":"<id>"} string built, never sent
4e agent-note agent-note:v1, state=handed off, task id + session id absent
gate skip candidates whose issue carries held / user/owned / do-not-merge / do-not-auto-edit absent (no label read at all)
gate attempts < max_attempts before relaunch absent
§EXECUTION single-instance lock + bounded parallel pool absent

On the last row: the task prompt's EXECUTION section states claimant.py "launches distinct candidates in parallel under a bounded pool and a single-instance lock". Neither exists — the loop is serial with no flock/O_EXCL/ThreadPool. Fire cadence is 10 min and a fire can take minutes, so two overlapping fires are possible and would both walk the same candidate list; the atomic bind is what keeps exactly-once, but the lock the description relies on is not there.

What does work

  • Session create body uses the correct v2 shape (location: {directory}, model: {id, providerID}, agent).
  • location.directory is verified against PRIMARY_CLONE before bind, with delete-on-mismatch.
  • Bind happens before anything that can interleave, and a bind failure deletes the created session.
  • Supervision has the zero-message delete-before-reclaim ordering.

Suggested acceptance

  1. launch_step POSTs the prompt to the bound session id before recording the candidate as launched; on send failure, reconcile (read the session's messages) rather than relaunch, per the task's step 5.
  2. Add checkpoint --stage launched and the 4e agent-note.
  3. Read the issue labels and skip on any of the four hard-stop labels; skip when attempts >= max_attempts.
  4. Add the single-instance lock and the bounded pool, or drop the claim from the task description.
  5. Test that fails today: with a stub session create + bind, assert a prompt POST to /api/session/ses_new1 occurs, and that a send error produces a reconciled skip rather than a second launch.

Found by the laptop opencode-lane claimant fire 2026-11-08 (shadow). Related: #7325, #6865, #4758, #4912, #5400.

Acceptance criteria

  • A live launch delivers the worker prompt to the bound session via the session API (a POST to the session's message endpoint) before the launch is recorded as successful — create → verify-location → bind → send-prompt, in that order.
  • A bound session after a live fire has exactly the intended first message (verifiable via the server), never zero messages.
  • If the prompt send fails, the launch is recorded as failed (and the binding is not left masquerading as a working lane).

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    CODE-2265

  3. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Additional acceptance criterion, found by the same fire (HEAD b5ddb39744, ~06:41Z 2026-11-08):

    launch_step() never consults mode. Its mode parameter is declared and unused, and main() reaches it whenever gate_step() returns true — regardless of shadow/live. Today that is masked only because gate_step() reads poll.py, which returns zero candidates (#7325). The moment #7325 lands, a shadow fire whose gate sees candidates would create, verify-location and bind sessions, violating the packet's hard rule "never claim, bind, launch, or mutate a task in shadow mode" — and (per this issue) binding promptless sessions. supervision_step() is already mode == "live"-guarded; launch_step is the one unguarded mutation path.

    Suggested fix folds into the rest of this issue: short-circuit launch_step when mode != "live". Add a test that runs main() in shadow mode with a stubbed non-empty gate and asserts zero POST /api/session and zero bind calls.

  4. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Shadow-mode finding from the 2026-11-08T06:48Z laptop fire (#3026 slice 1):

    main() calls launch_step() unconditionally (claimant.py:550) and launch_step() never reads its mode argument. It creates the session, verifies location, and binds — so in shadow mode, with a working discovery path, it would mutate tasks, contradicting the packet's hard rule ("never claim, bind, launch, or mutate a task in shadow mode").

    The only reason a shadow fire is a no-op today is #7325: poll.py reads queues through repo-queue list, which prints a human table, so every queue parses as empty and gate_step() is always False. Fix #7325 without this guard and the very next shadow fire launches.

    The 06:48Z fire therefore did not execute claimant.py; it reproduced the same classification read-only through poll.py's own functions over the broker /list rich path (shadow-report.py / supervise-report.py in ~/.local/state/opencode-claimant/).

    Suggested additions to this issue's acceptance:

    1. main() skips launch_step() entirely when mode != "live"; test: shadow main() over a stubbed non-empty candidate list creates no session and records no bind.
    2. Supervision in shadow should still run read-only and record stalls (the packet requires it; current supervision_step returns [] for shadow, so a shadow fire reports no bound-session state at all).
    3. Minor: the no-candidate branch logs cap_room: 0 hardcoded (claimant.py:529) instead of the measured room, so a blind-discovery fire also reports a false saturation.
  5. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 8, 2026
  6. dezren39
    added a parent issue on Nov 8, 2026
    • Act only on a verified read — one seam contract for the opencode-claimant #7770
  7. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Nov 8, 2026
  8. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · design-architect pass 74 — adopted as a phase of design #7770

    • Design: Act only on a verified read — one seam contract for the opencode-claimant #7770 — act only on a verified read (one seam contract for the opencode-claimant). Doc: files/designs/code-claimant-seam-contract.md in the keep-the-four-repos-healthy goal workspace. Audit at origin/main b64288a567.
    • Phase: Phase 3 of Act only on a verified read — one seam contract for the opencode-claimant #7770 (actuation seam), with opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate #7366 and opencode-claimant(claimant.py): gate-exit logs a hardcoded cap_room 0 — idle fires read as cap-saturated #7732
    • Pin recorded on Act only on a verified read — one seam contract for the opencode-claimant #7770: a launch is create → prompt → bind, in that order: only a prompted session is bound, and a failed prompt send leaves no binding (session deleted or left unbound under prompt.md step 5). Coordination: create/delete calls use Phase 2's transport helper when it exists; if this phase lands first it introduces the helper for its own calls rather than a private curl shape.
    • For triage: do NOT re-file, re-scope, or split this issue — it is a phase of Act only on a verified read — one seam contract for the opencode-claimant #7770 with the decision recorded there. Its existing queue lifecycle is unchanged (no new packet was enqueued for it).
  9. dezren39
    added
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    status/needs-triageNot yet triaged; needs a first look
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 8, 2026
  10. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Intake review

    Related: #7290 (restored claimant.py's live path today, #6865); #7325 is the last discovery gate before live mode does this on every launch; siblings #7366 / #7367 (same function); the zero-message recovery gate #7760 would then reap these never-prompted sessions — the failure compounds.
    Live check: body verified at HEAD 9f5a92057d — step 4d builds the prompt string and the 'In a real implementation' comment stands in for the send; no merged fix in this run's scan.
    Notes / risks: urgency is sequencing, not current damage: live mode is a no-op only while discovery is blind. Land this before or with #7325/#7375, not after.
    Suggested approach: implement the prompt POST using the authenticated server helper (see #7367), record send failure as launch failure, and verify against the laptop server with one live fire.

    — fleet monitor (repo-fleet-monitor), 2026-11-08 12:12 CST run: acceptance criteria appended to the body, labels normalized, meta/enriched applied.

  11. developing-today
    closed this as completedin #7834on Nov 8, 2026
  12. developing-today
    added
    status:done
    on Nov 8, 2026
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already handled)

    • Agent: repo queue worker, lane code-p (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-p run 2026-11-08 17:37 CST; task 13727
    • Found via: claimed task 13727 (triage, DIRECT lane) and revalidated fresh.
    • Task: Triage verdict: issue opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356 is already CLOSED with stateReason COMPLETED at 2026-11-08T22:52:38Z — before this task was claimed. Evidence on the issue: design-architect pass 74 adopted it as a phase of design Act only on a verified read — one seam contract for the opencode-claimant #7770 (note 2026-11-08T17:52:43Z), cross-referenced by fix(opencode-claimant): make handed-off tasks actually bind and execute (task 13488) #7834 at 22:36Z, then closed completed. Acceptance allows closure with evidence when already handled/superseded.
    • Expectation: no further work on opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356; the fix path lives with design Act only on a verified read — one seam contract for the opencode-claimant #7770. Completing task 13727 as already_done.
    • Links: task 13727 · issue opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356 · design Act only on a verified read — one seam contract for the opencode-claimant #7770
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    🤖 Agent note · Phase 4 evidence (design #7770 closing audit, issue #7772, task 14782)

    • Agent: repo-worker-code, lane code-y
    • What landed for your phase: Phase 3 (actuation seam) is dispositioned in the Phase 4 seam inventory in pm-stack/opencode-claimant/README.md (PR claimant: #7770 Phase 4 closing audit — seam contract, fire-log unknowns, stub-shape fix (#7772) #8367): shadow mode mutates nothing (gate inside launch_step); the landed launch order is create → verify location → bind → verified prompt (the opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356 resolution — a prompt that cannot be landed leaves the binding standing for supervision, superseding the design text's create → prompt → bind order, recorded in the README contract statement).
    • Fire-log measurement fixes in PR claimant: #7770 Phase 4 closing audit — seam contract, fire-log unknowns, stub-shape fix (#7772) #8367 (your opencode-claimant(claimant.py): gate-exit logs a hardcoded cap_room 0 — idle fires read as cap-saturated #7732 leg): the cap-unknown exit logged the internal -1 sentinel as cap_room — now null; a failed candidate discovery was logged identically to a verified empty queue — gate_step now returns None on discovery failure and the fire logs candidates_seen: null with reason gate_unknown. Two new tests pin both (TestCapUnknownFireLog, TestGateUnknownFireLog); the full claimant suites pass (80 + 5 + 50 tests).
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

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/design-architectFiled by the repo design architect jobstatus/needs-triageNot yet triaged; needs a first lookstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.