Skip to content

mcpdo --load: calls aborted by connection_lost are tallied as "[object Object]" #2866

Closed

Description

@cliffhall

Found in the v2.14.0 release smoke (#2865). This is a regression from #2835 / PR #2855, so it is in the v2.14.0 milestone.

What happens

When the server dies during an mcpdo tools/call --load run, the run stops early with connection_lost as intended. But the calls still in flight are tallied as [object Object]:

$ mcpdo @load tools/call echo message:=x --load --load-concurrency 4 --load-duration 20
#   (the server is killed 2s in)
  Outcomes:   12696 ok, 0 tool errors, 4 errors
  Top errors:
    4× [object Object]
  Stopped early (connection_lost): the connection went error

Published 2.13.0 on the same scenario prints 4× AbortError: This operation was aborted.

Cause

clients/mcpdo/src/daemon/server.ts now aborts the run with a LoadStop object (stop.abort(lost)), so the summary can say why it stopped. That same stop.signal is also the client's ambient request signal. The SDK's request cancel() turns an abort reason into its rejection with new SdkError(RequestTimeout, String(reason)), and uses String(reason) for the notifications/cancelled reason too. So every in-flight call rejects with an SdkError whose message is literally [object Object]. A debug patch on the built daemon confirmed this: SdkError: [object Object] … at cancel … at InspectorClient.onStatus, with code: 'REQUEST_TIMEOUT'. The engine's tally only reports that message.

(An earlier version of this section blamed the engine's String(err). That was wrong: by the time the engine sees the value it is already an Error.)

Expected

Each in-flight call cut short by the run's own stop is tallied with a readable message that names why.

Fix scope

In mcpdo's daemon, give the in-flight requests their own AbortController, aborted alongside stop but never with the LoadStop:

  • When the caller hangs up, use a plain abort(). This gives an AbortError, as in 2.13.0.
  • When the connection drops, abort with a DOMException("load run stopped: <detail>", "AbortError").

The same signal is used for the primary's and each extra's ambient signal, and for the extra-connection dial. The engine's own signal still carries the LoadStop, so stoppedEarly is unchanged.

Activity

  1. added this to the v2.14.0 milestone on Nov 4, 2026
  2. added
    bug
    v2
    on Nov 4, 2026
  3. self-assigned this
    on Nov 4, 2026
  4. cliffhall commented on Nov 4, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Medium (total 8)

    Board: #28, Status In Progress.

  5. added a commit that references this issue on Nov 6, 2026
    abce4e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions