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 — mcpx: Phase 2 of #1634 — re-issue a broken modern request once (tools/call gated on annotations) · Issue #1638 · developing-today/code

mcpx: Phase 2 of #1634 — re-issue a broken modern request once (tools/call gated on annotations) #1638

New issue
Copy link
New issue
Copy link
Closed
Closed
mcpx: Phase 2 of #1634 — re-issue a broken modern request once (tools/call gated on annotations)#1638
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Phase 2 of design #1634 (mcpx client session & stream recovery). Design doc: files/designs/code-mcpx-client-session-stream-recovery.md in the keep-the-four-repos-healthy goal workspace. Independent of Phase 1 (different era, different trigger) — either may land first.

Scope

Re-issue a modern (2026-07-28) request once when its response stream breaks — the 2026 spec's client MUST — without ever silently double-executing a tool call.

  • Give the stream-lost error a stable, checkable identity. Today lost() (internal/mcpclient/http.go ~L378-389) synthesises code -32000 (codeStreamLost), which the receive loop's "connection closed" failure shares; matching on message text is not acceptable. A marker in the error's data or an equivalent in-package sentinel — triage settles the shape.
  • Re-issue at the request layer (Client.roundTrip, internal/mcpclient/client.go ~L953), so each MRTR input_required round is its own request: same method and params, once only, with a NEW request id. No re-issue when the caller's context is done. A second stream-lost surfaces the error.
  • tools/call gate (decision recorded on Design: mcpx client session & stream recovery — re-initialize on a legacy session 404, re-issue a broken modern request once #1634, from PM-06's own hazard note): every other method (lists, reads, ping/server/discover, completions, prompt gets — reads by protocol nature) is re-issued automatically. tools/call is re-issued automatically only when the tool's annotations declare readOnlyHint or idempotentHint; otherwise the stream-lost error surfaces unchanged and the host decides. Annotations are retained at list time for call time — Tool.Annotations (client.go ~L159-170) carries them raw, and the client's per-tool toolHeaders retention (modern.go) is the precedent.
  • Legacy era is excluded: legacy's broken-stream mechanism is resumability (resume(), http.go ~L338); when resumption is exhausted the error surfaces, as today.
  • Retire conformance gap streamable-http-client-reissue-broken-request (internal/conformance/coverage_transport.go).

Evidence (main ed8e591, 2026-10-28)

  • Gap at internal/conformance/coverage_transport.go:114 (origin mcpx client: legacy Streamable HTTP and stdio robustness — session 404, GET stream, SSE retry, string ids, stream timeout, version header dezren39/darwin-nix#203): "a broken 2026-07-28 response stream is reported lost to the caller (http.go); nothing re-issues the request with a new id".
  • A modern SSE stream ending unanswered calls t.lost(reqID) (internal/mcpclient/http.go ~L190-205) and the call fails with the synthesised -32000.
  • PM-06 (docs/compare/register/process-model.md:133-146): 2026-07-28 changelog — "clients MUST re-issue it as a new request with a new request ID"; and the register's own risk note — "re-issuing a non-idempotent tool executes it twice; nothing makes the server deduplicate" — which is why the tools/call gate exists and why a blanket re-issue was rejected on Design: mcpx client session & stream recovery — re-initialize on a legacy session 404, re-issue a broken modern request once #1634.

Acceptance

  • Fake modern upstream that kills the response stream: a list call succeeds after exactly one re-issue, and the two attempts carried distinct request ids.
  • A tools/call against a tool annotated readOnlyHint (and one annotated idempotentHint) is re-issued once and its result returned.
  • A tools/call against an unannotated or destructive-annotated tool surfaces the stream-lost error, and the upstream observed exactly one execution.
  • A stream that breaks on the re-issue as well → the error surfaces; no third attempt.
  • Caller-cancelled context → no re-issue.
  • Legacy broken-stream behaviour unchanged (resume path untouched).
  • Gap streamable-http-client-reissue-broken-request retired; go test ./... for pkgs/mcpx passes in CI.

Out of scope

Legacy session-404 recovery (Phase 1), register truth-up (Phase 3), a configurable re-issue count (open question on #1634 — one is the recorded default), re-issuing server-initiated requests from a dead stream.

Activity

Next
  1. dezren39
    added
    kind/featureNew feature or capability request
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    source/design-architectFiled by the repo design architect job
    on Oct 28, 2026
  2. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-657

  3. dezren39
    added a parent issue on Oct 28, 2026
    • Design: mcpx client session & stream recovery — re-initialize on a legacy session 404, re-issue a broken modern request once #1634
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (triaged)

    • Agent: queue worker (repo-worker-code), Lane B
    • Session / ID: queue task 1771 (triage)
    • Found via: queue claim
    • Task: Triage verdict — scope CONFIRMED against current main (ed8e5910); both shapes settled; implementation packet enqueued as queue task 1778. Phase 2 is independently landable (modern-era only; no Phase 1 / mcpx: Phase 1 of #1634 — re-initialize on a legacy session 404 and retry the request once #1637 dependency).
    • Stream-lost identity — settled: a data marker, never message matching. lost() (internal/mcpclient/http.go:378) synthesises codeStreamLost (-32000, const :388) with no marker today, while the receive loop (client.go:870) synthesises its own -32000 "connection closed" — same code, different meaning (transport death; re-issuing into it is wrong), and a server can send -32000 too. Task 1778: lost() adds data: {"mcpxStreamLost": true}; only marked errors trigger re-issue.
    • Annotation retention — settled: the toolHeaders precedent, minus its gate. A per-Client hints map parsed from Tool.Annotations (kept raw today, client.go ~:159) at list time under c.mu, refreshed on ListTools — following checkToolHeaders (modern.go:499) in shape, but NOT gated on mirrorsHeaders(), since the tools/call gate must work whether header mirroring is on or not. Coordination note in the packet: queue task 1641 (mcpx: Phase 2 of #1554 — client task execution for taskSupport "required" tools (internal/mcpclient) #1556) is adding a per-Client cached tool lookup in the same CallTool/ListTools area — one shared cached snapshot beats two.
    • Re-issue placement: the attempt loop belongs in roundTrip (client.go:953 — single-shot today; fresh id per attempt from nextID; each MRTR round is its own roundTrip so rounds re-issue independently; no re-issue when ctx.Err() != nil — the transport already suppresses lost() on cancellation); policy comes from the caller via call/CallTool (:902/:1164): automatic for all methods except tools/call, which requires retained readOnlyHint or idempotentHint. A second marked failure surfaces. The conformance gap (coverage_transport.go:114) is retired in the same PR.
    • Links: follow-up packet hidden_files/packets/task1771-followup-1638.json (goal workspace) · design Design: mcpx client session & stream recovery — re-initialize on a legacy session 404, re-issue a broken modern request once #1634
  6. 86 remaining items

  7. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 28, 2026
  8. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 1778 (resumed claim, 2026-10-28T14:51Z)
    • Found via: queue claim
    • Task: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 was fully green on head a34ae7e6 but CONFLICTING with current main. I merged main on the laptop worktree (d1b60238): the only code conflict was in ListToolsWithHints — this branch's recordToolHints(all) and main's schemaval pass (feat(mcpx): validate CallTool arguments against inputSchema (-32602), warn on output mismatch (#1483) #1596) both kept; conformance matrix regenerated; laptop go test ./internal/mcpclient/ ./internal/conformance/ pass. Parked on CI for the merged head: every job still queued after >6 min (runner backlog).
    • Expectation: resume in ~20 min — check PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 checks fresh; if green, merge and complete task 1778 as fixed_merged.
    • Links: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 · branch queue/1778-1638-mcpx-reissue
  9. 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 Oct 28, 2026
  10. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane A
    • Session / ID: queue task 1778 · repo-queue-worker-shift 2026-10-28 10:24 CDT
    • Found via: queue claim (resume from park)
    • Task: Resume parked task: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 CI was pending on head d1b6023; fresh check shows all checks pass and PR is CLEAN/MERGEABLE — merging and completing.
    • Expectation: done = PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 merged, issue mcpx: Phase 2 of #1634 — re-issue a broken modern request once (tools/call gated on annotations) #1638 closed, task 1778 completed fixed_merged
    • Links: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 · branch queue/1778-1638-mcpx-reissue
  11. dezren39
    added a commit that references this issue on Oct 28, 2026

    Merge pull request #1645 from developing-today/queue/1778-1638-mcpx-r…

    18f9074
  12. developing-today
    added
    status:done
    on Oct 28, 2026
  13. developing-today
    closed this as completedon Oct 28, 2026
  14. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane A
    • Session / ID: queue task 1778 · repo-queue-worker-shift 2026-10-28 10:24 CDT
    • Found via: queue claim (resume from park)
    • Task: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 CI on merged head d1b6023 verified fully green (all checks pass, PR CLEAN/MERGEABLE) — merged.
    • Expectation: done — PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645 MERGED (merge commit 18f9074), issue mcpx: Phase 2 of #1634 — re-issue a broken modern request once (tools/call gated on annotations) #1638 CLOSED, task 1778 completed fixed_merged
    • Links: PR mcpx: re-issue a broken modern request once, tools/call gated on annotations (#1638) #1645
  15. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  16. dezren39
    added a commit that references this issue on Oct 29, 2026

    docs(mcpx): register truth-up TR-29 / PM-06 as-built + roadmap row (#…

    26221fc
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/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus: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.