Skip to content

mcpx: correlate -32042 retries with the suspended call (no double execution) #2897

Open

Description

@dezren39

Problem

PR #2886 (#2080) returns -32042 to a 2025-11-25 host while the broker keeps the pending URL questions and the original ask call stays alive (triage-settled design on #2080: no Abandon; the host completes the elicitations out of band and retries, mirroring the spec flow and the client-side flow of #2079).

Codex review on #2886 (P1, pkgs/mcpx/internal/mcpserver/ask.go) points out the asymmetry this creates in mcpx's suspended-call architecture:

  • When the out-of-band flow completes, OnElicitationComplete (internal/daemon/hooks.go) answers the broker question, so the original upstream invocation resumes and can complete the operation.
  • The host's retry after -32042 reaches beginAsk, which calls Ask.Begin again — there is no requestState or other retry correlation in the 2025-11-25 error — so the retry starts a second upstream invocation.
  • For a non-idempotent operation, both executions can run.

A spec-shaped -32042 server has ended its invocation when it returns the error; mcpx has not, so the spec's retry model does not by itself prevent double execution here.

Scope / acceptance

  • Decide and implement a correlation or prevention mechanism, e.g. join-on-retry in the daemon asker (a retry whose method+params match a live/completed ask with answered URL questions reattaches to that call instead of Begin-ing a new one), or another mechanism that preserves the settled "broker keeps the questions" behaviour.
  • A test proving: host retries after out-of-band completion → the upstream operation executes exactly once (or the retry is answered from the original call's outcome).
  • Non-idempotent pass-through calls are the case that must be safe; document what a host that retries before completion gets.

Origin

Codex P1 finding 4429651482 on PR #2886, dispositioned there as: real, but a design-level change beyond #2080's triage-settled scope (settled triggers + no-Abandon). Tracked here so the merge of #2886 does not silently ship it.

Acceptance criteria

  • A host retry after a -32042 response whose out-of-band elicitations have completed does NOT start a second upstream invocation: it reattaches to (or is answered from) the original call, so a non-idempotent operation executes exactly once — proven by a test.
  • A retry that arrives before completion has documented, tested behaviour (no silent double execution).
  • The settled mcpx: Phase 3 of #2077 — produce -32042 where it is true, register truth-up (ELI-04/09/12), and #1935 closure #2080 behaviour is preserved: the broker keeps the pending questions and no Abandon is introduced.
  • CI green on the PR that implements this, including the new exactly-once test.

Activity

  1. added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Intake review

    🤖 Agent note · filed

    Still live: yes — PR #2886 (which surfaced this) is still open; no merged PR resolves this. The double-execution hazard is real per the Codex P1 cited in the body.

    Related: #2080 (the -32042 behaviour that created the asymmetry), #2079 (client-side flow), PR #2886.

    Notes / risks: non-idempotent pass-through calls are the dangerous case; a join-on-retry keyed on method+params must not merge two genuinely distinct concurrent calls with identical params — the design needs a distinguishing rule (e.g. only join when the original's questions were answered out of band).

    Suggested approach: join-on-retry in the daemon asker as sketched in the body, with the exactly-once test first.

    Labels normalized: kind/bug, priority/high (double execution of non-idempotent operations), effort/m, status/needs-triage, meta/enriched. Acceptance criteria appended to the body (its own Scope/acceptance bullets are preserved above).

  3. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  4. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7371 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  5. 10 remaining items

  6. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    task: 8931
    lane: code-y
    stage: handed_off
    execution_lane: opencode
    Issue #2897 verified OPEN with no hard-stop labels. Task 8931 re-claimed (attempt 11/12) and handed off to the opencode claimant, which launches the bound session. Attempts are near the cap (11/12) — if the claimant does not launch before lease expiry, the fleet monitor may need to raise the cap.

  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  12. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up, handed off to opencode claimant (task 8931) — AT CAP 24/24

    • Task: task 8931 (repo-health-code-pilot, lane code-r, 2026-11-05). Execution-lane assignment returned opencode, so this worker does not work the task directly.
    • Fresh revalidation: issue mcpx: correlate -32042 retries with the suspended call (no double execution) #2897 OPEN, no hard-stop labels (no held / user/owned / do-not-merge / do-not-auto-edit); claim labels already in sync (queue/claimed, work/assigned, status/in-progress).
    • AT CAP: task 8931 is at attempts 24/24 — this claim is the last cycle the queue will grant. If the claimant does not launch before this lease expires, task 8931 becomes unclaimable and needs a max_attempts raise (fleet-monitor repair pattern) before any lane can work mcpx: correlate -32042 retries with the suspended call (no double execution) #2897 again. Flagged in the lane handoff snapshot and the shift report.
    • Handoff: checkpointed stage handed_off; the laptop opencode-claimant launches the bound session for task 8931.
  14. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  15. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 8931 (repo-fleet-monitor run 2026-11-05T15:39:47Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 8931 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 8931 up from the queued state and posts a fresh pickup note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day 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 task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/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