Skip to content

fix(harness): end MCP lists at a blank cursor and hide TypeError messages - #128

Merged
sanchitrk merged 1 commit into
canaryfrom
claude/cod-204-mcp-07314c
Nov 1, 2026
Merged

sanchitrk merged 1 commit into
canaryfrom
claude/cod-204-mcp-07314c

Conversation

@sanchitrk

Copy link
Copy Markdown
Contributor

Summary

  • Blank server cursor. nextCursor: "" is dropped from every MCP list result at the transport, before the SDK sees it. The SDK's page walk (tools, resources, templates, prompts) and the resource tools now end there instead of restarting until the 64-page cap. The empty-cursor expectation in mcp.client.test.ts flips accordingly.
  • Raw TypeError messages. describe() returns invalid request (TypeError) for a TypeError without a system code, so the runtime's own errors (an invalid header name, say) no longer reach the server status, warnings or tool results with what they rejected. TypeErrors with a code keep fetch failed (ECONNREFUSED).

Tests

  • New E2E test/mcp.followups.test.ts: a stdio fixture whose second pages end in "", plus an HTTP server with a header fetch rejects. Snapshots paging, status, events, log and warnings to __artifacts__/mcp-review-followups.json and asserts the header name and value appear nowhere.
  • All non-live test/mcp.*.test.ts pass (60 tests); vp check and vp run typecheck pass.

🤖 Generated with Claude Code

…ages

A server's `nextCursor: ""` is now dropped from every list result, so the
SDK's page walk and the resource tools treat it as the last page instead
of restarting until the page cap.

A TypeError without a system code is described as
`invalid request (TypeError)`: the runtime's own errors, such as an
invalid header name, may quote the rejected value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanchitrk
sanchitrk merged commit ec09b05 into canary Nov 1, 2026
2 checks passed
@sanchitrk
sanchitrk deleted the claude/cod-204-mcp-07314c branch November 1, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant