fix(mcp): close late probe sessions - #1266
Closed
sethkarten wants to merge 15 commits into
Closed
Conversation
7 tasks
# Conflicts: # packages/coding-agent/src/cli/command-registry.ts # packages/coding-agent/src/core/mcp/mcp-probe.ts # packages/coding-agent/test/mcp-probe.test.ts
sethkarten
marked this pull request as ready for review
August 12, 2026 00:55
sethkarten
force-pushed
the
core08-mcp-probe-boundaries
branch
from
August 12, 2026 18:35
3a1d93b to
91bce62
Compare
Contributor
Author
xsyetopz
pushed a commit
to xsyetopz/prime-agent-next
that referenced
this pull request
Aug 15, 2026
Reconstruct the unique net delta from PR PrimeIntellect-ai#1266, excluding propagation merges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
Not run: root tsgo --noEmit is unavailable in this checkout. The scoped public/declaration suites cannot load because workspace dependencies are absent.
Note
Fix MCP probe to close sessions that resolve after the deadline
runMcpDeclarationProbein mcp-probe.ts with injected transport, enforcing trust/offline guards, bounded timeouts, and guaranteed session cleanup.onLateCleanupFailurecallback rather than thrown.publicProbeErrorto avoid leaking endpoint or transport details.mcp testfrom the public CLI command, throwing immediately if invoked in that context.Macroscope summarized fb70146.
Final reconciled validation
4af99680b698918cd14981d506fcd14804cc1f81tsgo --noEmit: passgit diff --check: pass; final worktree cleanNote
Medium Risk
Changes MCP trust/error-handling boundaries and session lifecycle; scope is limited to probe plumbing and CLI surface, with redaction and tests.
Overview
Adds
runMcpDeclarationProbeas an internal, injected-transport handshake (initializethentools/list) with bounded timeouts, generic error messages (no URL/credential leakage), and cleanup of sessions that open after the deadline viaonLateCleanupFailure.Public CLI no longer documents or accepts
mcp test; it fails before MCP parsing or settings access. Help text formcpis updated to match declarative-only commands.Reviewed by Cursor Bugbot for commit fb70146. Bugbot is set up for automated code reviews on this repo. Configure here.