Repository navigation
fix(server): keep remote delegation idempotency namespace durable across restarts - #222
Open
nullStack65 wants to merge 1 commit into
Open
nullStack65 wants to merge 1 commit into
nullStack65 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Owner
Author
|
Independent fresh-context review of the change that keeps the remote-delegation retry namespace durable across origin restarts, at exact head What I checked
Result: no important or critical findings. One nit (below) about the wider dedupe scope. It is intended and documented, so it does not block. {
"reviewed_base": "caf9ebeb0cae23bee584f7b0acf3856fb6f6cada",
"reviewed_head": "6e7117730fe7a6333167c46b0e0eee22e842be55",
"reviewer": "claude-opus-5-5, Claude Code via T3 Code (drain-supervisor reviewer)",
"author_session": "unknown: native author session not supplied; PR body names Model gemini-4-neon, Task fix",
"reviewer_session": "claude-code:47fbd824-a68e-4b56-a5c6-7670a76330b5",
"fresh_context": true,
"review_kind": "full",
"round_id": "claude-code:47fbd824-a68e-4b56-a5c6-7670a76330b5",
"intent": [
"R1: retrying delegate_task with the same clientRequestId after an origin restart or credential rotation does not launch a duplicate remote task",
"R2: a crash between the remote launch and the local delegated-task record is recoverable by retrying with the same clientRequestId",
"R3: distinct clientRequestId values still launch new remote tasks"
],
"prior_findings": [],
"findings": [
{
"id": "F1",
"severity": "nit",
"outcome": "open",
"file": "apps/server/src/mcp/McpSessionRegistry.ts",
"line": 139,
"summary": "The thread-scoped namespace widens dedupe for every MCP tool, not only delegate_task. Reusing a clientRequestId on the same thread in a later provider session now replays the earlier result instead of acting again. For example, request_secret with a pasted value returns the first file unchanged (SecretRequests.savePasted). This matches the documented 'same action and thread' contract, so it is not a defect. A one-line note on clientRequestId that a key must be unique for the thread's lifetime would make it explicit for models."
}
]
} |
nullStack65
force-pushed
the
fix/clo-1091-remote-delegation-idempotency
branch
from
November 27, 2026 03:58
6e71177 to
79eda00
Compare
…oss restarts Squash-rebase of PR #222 onto current release/native-0.1.10; no behavior change from the original commits. Original authoring trailers: Model gemini-4-neon / Task fix / Agent antigravity Model: claude-opus-5-5 Task: fix Agent: Builder drain parked-PR lane (Claude Code worker F3) Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: Opus 5.5 Skills-SHA: unknown (source unavailable) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nullStack65
force-pushed
the
fix/clo-1091-remote-delegation-idempotency
branch
from
November 28, 2026 05:47
79eda00 to
816e682
Compare
This branch has not been deployed
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.
Problem
McpSessionRegistryset each thread credential'srequestNamespaceto its ephemeral in-memoryproviderSessionIdUUID. When the origin T3 server restarted (or rotated credentials), retryingdelegate_taskwith the sameclientRequestIdproduced a new idempotency key:delegated_task.remote.requestrecording could not be recovered by retrying with the sameclientRequestId, stranding the remote thread and lane.Fix
requestNamespacedeterministically from durable thread identity (thread:${threadId}) inMcpSessionRegistrywhile keepingproviderSessionIdand bearer tokens ephemeral per credential.environmentIdandthreadIdwhen looking up a replayed remote task record inRemoteDelegation.McpSessionRegistryinstances across origin restarts covering:taskIdand remote thread),clientRequestIdvalues still launching new remote tasks.Verification
vp run typecheck: 41/41 packages passedvp test run(apps/server/src/mcp/McpSessionRegistry.test.ts,apps/server/src/peer/RemoteDelegation.test.ts): 2 files, 69/69 tests passedvp fmt --check&vp linton touched files: 0 warnings, 0 errorsDeploy: fleet
Model: gemini-4-neon
Task: fix