Skip to content

mcpx: Phase 2 of #2077 — handle upstream -32042: open the URL elicitations at the broker and retry the call once #2079

Closed

Description

@dezren39

Phase 2 of design #2077 (origin umbrella #1935, register row ELI-12, client half). Design doc: files/designs/code-mcpx-elicitation-era-edges.md in the keep-the-four-repos-healthy goal workspace. Decision is recorded on #2077 — this phase implements it as scoped; do not re-file under #1935, this is its implementation slice for ELI-12's client half.

Scope

On current main, -32042 (URLElicitationRequiredError, 2025-11-25 only) appears nowhere in pkgs/mcpx/internal/mcpclient or internal/daemon: an upstream's -32042 propagates as an opaque rpcError (code preserved, internal/mcpclient/client.go ~L1040, ~L1466-1506) and the call fails — mcpx never runs the URL flow and never retries.

  • On a connection negotiated at 2025-11-25, when a call fails with -32042: parse data.elicitations; each entry must be url-mode with an elicitationId (the spec's MUSTs) — a malformed entry fails the call with the original error, unmodified.
  • Open each listed elicitation as a broker URL question via the existing elicitViaBroker path (internal/daemon/hooks.go ~L121-146), keyed by the upstream's elicitationId, so the human flow is the existing one (full URL shown, consent, OnElicitationComplete at hooks.go ~L57-68 marks completion).
  • On completion, retry the original call exactly once. Decline, expiry, or a second -32042 surface as the call's error — no loop.
  • Era discipline: no -32042 handling on 2026-negotiated connections (code reserved there; input_required is the replacement and already works) or pre-2025-11-25 connections (code does not exist).
  • Triage check (recorded in the design doc): broker row keying — if broker rows are not namespaced by server, two upstreams choosing the same elicitationId collide (register ELI-09 risk note); fix or record on this issue.

Independent of Phase 1 in code (different files, different seam).

Acceptance

  • Upstream -32042 → broker URL question(s) with the listed URL/id → completion → retried call succeeds, end to end in a test.
  • Decline or expiry → the call fails with a named error and no retry occurs; a second -32042 → error surfaces, no further retry.
  • Malformed data.elicitations → original -32042 error propagates untouched.
  • Behaviour at 2026 and pre-2025-11-25 revisions is unchanged from today.

🤖 agent-note:v1 — filed by the design-architect job (pass 11) as a sub-issue of design #2077. Audit basis: main 26221fcc, 2026-10-28.

Acceptance criteria

  • On a 2025-11-25 connection, a call failing with -32042 has its data.elicitations parsed; each entry must be url-mode with an elicitationId, and a malformed entry fails the call with the original error unmodified.
  • Each listed elicitation is opened as a broker URL question via the existing elicitViaBroker path, keyed by the upstream's elicitationId.
  • After the URL flow completes, the original call is retried exactly once; a second -32042 is not retried again.
  • Tests cover the happy path, the malformed-entry path, and the no-second-retry path.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 agent-note:v1 — design-architect pass 11 (2026-10-28): Phase 2 of design #2077, filed as its sub-issue (verified). Triage packet enqueued: pilot task 3001 (queue=repo-health-code-pilot, status=queued, verified). Packet: hidden_files/queue-packets/packet-2079.json in the keep-the-four-repos-healthy goal workspace. Independent of Phase 1 in code. Decision recorded on #2077; design doc files/designs/code-mcpx-elicitation-era-edges.md.

  5. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  6. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake (2026-10-29) — verified still live: no merged PR or commit implements this yet; the filing audit/decision record it cites is current.

    Notes: Phase 2 of design #2077 (umbrella #1935, register row ELI-12 client half). Already labelled at filing; this pass adds the acceptance section and meta/enriched. Audit at filing: -32042 appears nowhere in pkgs/mcpx/internal/mcpclient or internal/daemon — an upstream -32042 currently propagates as an opaque rpcError. Independent of Phase 1 (#2078); Phase 3 (#2080) is gated on both.

    Suggested approach: Parse in internal/mcpclient where the rpcError surfaces (~L1040, ~L1466-1506), open broker questions via internal/daemon/hooks.go elicitViaBroker (~L121-146), retry once.

    Risks: Retry-once semantics must not double side effects for non-idempotent calls — the spec's flow assumes the original call did not execute; verify that assumption in tests.

    Labels normalized by the monitor; acceptance criteria appended to the body (original text preserved verbatim above it).

  7. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. 56 remaining items

  9. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 30, 2026
  10. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (resume)

    • Agent: queue worker (repo-worker-code), lane B shift · Session / ID: queue task 3311 · Found via: queue claim
    • Task: Resume from awaiting_ci: PR feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitations, retry once (#2079) #2760 head f3cd6919, Codex review on this head clean (no findings, none unresolved; both earlier P2s fixed in 3adca52 and replied). Latest mcpx run 41129819201 failed only in the stress job — DATA RACE in TestLegacySession404Recovery/concurrent-calls-share-one-reinitialize (a different race than the earlier Detach one). Rerun of failed jobs triggered this shift; merge + complete if it passes, else evaluate as pre-existing-failure per the standing criteria.
  11. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions