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: session create sends a top-level `directory`, which the v2 API ignores — launched workers land in /home/user, not the repo primary · Issue #4870 · developing-today/code

opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870

New issue
Copy link
New issue
Copy link
Closed
#5336
Closed
opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary#4870
#5336
Copy link
Assignees
dezren39
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)priority/highImportant and time-sensitivesource/design-architectFiled by the repo design architect jobsource/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Summary

pm-stack/opencode-claimant/prompt.md tells the claimant to create the worker session with a top-level directory:

POST /api/session with JSON body {"directory": <the repo's laptop primary>, "title": ..., "model": {...}, "agent": "build"}

(prompt.md:79-82)

The v2 OpenCode server does not accept a top-level directory. session.create decodes location (Location.PublicRef = {directory}) and strips unknown keys, so the field is silently dropped and the session is created at the server default location — /home/user — not the repo primary.

Evidence

  • packages/protocol/src/groups/session.ts:221-234 — session.create payload is {id, parentID, title, agent, model, location, metadata, permissions, subagentPolicy}; there is no directory field.
  • pm-stack/dispatch/src/opencode.ts:52-58 — the working dispatch client sends location: { directory: opts.directory }.
  • pm-stack/opencode-claimant/prompt.md:79-82 — the claimant's instruction still says top-level directory.
  • Observed sessions launched by the claimant with this shape:
    • task 7077 → ses_e5e5ef40dccffesEpg4GoSqzeZ, location.directory=/home/user
    • task 7316 → ses_e5e5ef64873ffedhQFx8Dz4k6h, location.directory=/home/user
    • task 3275 → ses_e5e5fd27fa1ffeOpTSf2l3D84t, location.directory=/home/user
    • all three resolve to project a3b70b365cae… (the /home/user project), not the code-repo project.

Impact

Workers do still do the right work because the prompt text names the directory ("Work in /home/user/git/code"), but the session runs under the wrong project: the server's per-project context (AGENTS.md discovery, project attribution, session listing/aggregation by project) is the /home/user project. It also makes session→repo attribution in the aggregator unreliable, and it is why bound-session listings mix dir=/home/user and dir=/home/user/git/code.

Fix

In prompt.md step 4b, replace the top-level directory with the v2 location object, keeping the model in the model object:

{"title": "...", "location": {"directory": "<repo primary>"},
 "model": {"id": "workhorse", "providerID": "opencode-route"}, "agent": "build"}

A regression guard is worth having for the next launcher: assert that a created session's location.directory equals the requested repo primary before binding (the claimant can check the create response, which already returns location).

Found during the 2026-11-03 11:20Z fire of the opencode-claimant; this fire launched nothing because Supabase returned HTTP 544 (see the fire log), so the defect was documented rather than fixed inline.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    status/needs-triageNot yet triaged; needs a first look
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 3, 2026
  2. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  3. dezren39
    added a parent issue on Nov 3, 2026
    • design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
  4. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Nov 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    Adopted as Phase 2 of design #4912 (judge a session by its own record — the opencode-claimant's session contract), filed by the fleet design architect, pass 44 (2026-11-03). Design doc: files/designs/code-claimant-session-contract.md in the keep-the-four-repos-healthy goal workspace.

    Phase structure for triage: do NOT re-file, re-scope, or split this issue — it is the phase. The design records one strengthening of the issue's proposed fix: the regression guard is a required step, not optional — step 4b's create is verified before bind (the create response's location.directory must equal the requested repo primary; a mismatch is a creation failure, the task stays unbound, and the misplaced session is deleted per-id). Rationale in the design doc: two text-only shape fixes in this prompt (the model object, task 5857; now directory) have each cost a launch window. Phases 1 (#4757) and 3 (#4758) are independent; Phase 4 (#4916, closing audit) is gated on all three.

    This filing is also the third claimant-contract filing — the trigger recorded at design pass 42 for originating #4912.

    agent-note:v1 — design-architect adoption note, pass 44.

  6. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 70 (priority/high). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  8. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 4, 2026
  9. 24 remaining items

  10. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 4, 2026
  11. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task 9312 (lane code-q): parked 20m for CI on PR #5336. Checks contract corpus and aggregator tests/typecheck remained QUEUED through a >5-minute poll (runner backlog; no failures). Codex review completed, no findings; diff verified against acceptance; claimant test_poll.py 21 tests passed on laptop (prior checkpoint). Resume: fresh-check PR #5336, merge when green, then complete task 9312.

  12. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task 9312 resumed by lane code-g after its park: PR #5336 checks (contract corpus, aggregator tests and typecheck) are STILL QUEUED — they have been queued since the PR opened, a fleet-wide CI backlog, not a PR problem (docs-only prompt.md change; claimant test_poll.py 21 tests OK on the laptop). Task 9312 re-parks for CI. Resume: fresh-check PR #5336, merge when green, complete task 9312.

  13. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane W shift
    • Session / ID: task 9312
    • Found via: queue claim
    • Task: fix pm-stack/opencode-claimant/prompt.md step 4b — send the v2 location: {directory} object on session create and verify the returned location.directory before binding (Phase 2 of issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912)
    • Expectation: s — prompt-only change on a queue branch + PR this shift
    • Links: issue opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870 · issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
  14. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  15. dezren39
    added a commit that references this issue on Nov 4, 2026

    Merge pull request #5336 from developing-today/queue/9312-4870-claima…

    e886a92
  16. dezren39
    closed this as completedin #5336on Nov 4, 2026
  17. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane W shift
    • Session / ID: task 9312
    • Found via: queue claim
    • Task: done — the fix already existed as PR fix(claimant): v2 location object + verify before binding (#4870) #5336 (opened by lane code-g for task 9312, branch queue/9312-4870-claimant-location); this shift verified it instead of duplicating it and merged it
    • Verification: diff is prompt.md-only and matches every acceptance item (v2 location: {directory} create body, model object retained, verify response location.directory before bind, mismatch/missing location = creation failure with per-id DELETE and no bind). The edited example was checked against pm-stack/dispatch/src/opencode.ts createSession on current main — identical shape. No Codex findings were posted on PR fix(claimant): v2 location object + verify before binding (#4870) #5336. The one failing check (pm-aggregator tests: 2 health-inbox tests, feat(aggregator): source-conflict inbox — one resolvable queue for Project-vs-derived and Kaneo-vs-GitHub disagreements, with per-class trust rulings #1282) is pre-existing on main — the same workflow failed on main pushes at 07:32Z and 08:09Z today — and is unrelated to this prompt-only change; the contract corpus check passed.
    • Links: PR fix(claimant): v2 location object + verify before binding (#4870) #5336 (merged, e886a92) · issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
  18. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  19. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    state: phase-4-audit
    task: 13022
    lane: code-w
    issue: "#4916"

    Phase 4 closing audit of design #4912 (issue #4916, PR #8224) — origin summary for this phase:

    Phase 2 (this issue, #4870) — landed and closed. Session create in claimant.py is verified before bind: the created session is read back per-id and its location.directory confirmed before any bind (the v2 API had ignored the top-level directory, landing workers in /home/user). A create that cannot be verified is deleted, never bound — now contract rule 2 (verify before bind) in the README's Session Contract section.

    Phase 4's inventory dispositions POST /api/session and the per-id read-back compliant. This issue stays closed; no acceptance item was found unmet.

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

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

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)priority/highImportant and time-sensitivesource/design-architectFiled by the repo design architect jobsource/queue-workerFiled or worked by the queue/worker pilottask/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.