feat(server): t3_thread_launch takes clientRequestId #16654
t3code/peer/mode-limit-header fromrefs/pull/16654/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
juliusmarminge added labelsmacroscope-review
- apps/server/src/mcp/toolkits/project/handlers.test.ts line 225OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -404,3 +404,4 @@404404 }),405405 );406406407+it.effect("a launch retried with the same clientRequestId replays the first one", () =>apps/server/src/mcp/toolkits/project/handlers.ts lines 71 to 76OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -59,4 +65,12 @@5965 Effect.gen(function* () {6066 const context = yield* readCaller();6167 const { caller, scope } = context;62- const commandId = yield* newCommandId();68+ // A retry with the same key replays the first launch: the ids derive69+ // from the caller and the key, and the launch service replays a70+ // command it already accepted.71+ const commandId =72+ input.clientRequestId === undefined73+ ? yield* newCommandId()74+ : CommandId.make(75+ `mcp:launch:${encodeURIComponent(scope.requestNamespace)}:${encodeURIComponent(input.clientRequestId)}`,76+ );
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -57,5 +63,12 @@5763 (input, { runtimeMode, interactionMode }) =>5864 Effect.gen(function* () {5965 const context = yield* readCaller();60- const { caller } = context;61- const commandId = yield* newCommandId();66+ const { caller, scope } = context;67+ // A retry with the same key replays the first launch: the ids derive68+ // from the caller and the key, and the launch service replays a69+ // command it already accepted.70+ const commandId =71+ input.clientRequestId === undefined72+ ? yield* newCommandId()73+ : CommandId.make(74+ `mcp:launch:${encodeURIComponent(scope.requestNamespace)}:${encodeURIComponent(input.clientRequestId)}`,
juliusmarminge assignedjuliusmarminge
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge closed this
juliusmarminge reopened this
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XXL
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/mcp/toolkits/project/handlers.ts line 73OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -56,5 +62,12 @@5662 (input, { runtimeMode, interactionMode }) =>5763 Effect.gen(function* () {5864 const context = yield* readCaller();59- const { caller } = context;60- const commandId = yield* newCommandId();65+ const { caller, scope } = context;66+ // A retry with the same key replays the first launch: the ids derive67+ // from the caller and the key, and the launch service replays a68+ // command it already accepted.69+ const commandId =70+ input.clientRequestId === undefined71+ ? yield* newCommandId()72+ : CommandId.make(73+ `mcp:launch:${encodeURIComponent(scope.requestNamespace)}:${encodeURIComponent(input.clientRequestId)}`,apps/server/src/mcp/toolkits/project/handlers.ts line 85Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -56,5 +62,8 @@5662 (input, { runtimeMode, interactionMode }) =>5763 Effect.gen(function* () {5864 const context = yield* readCaller();59- const { caller } = context;60- const commandId = yield* newCommandId();65+ const { caller, scope } = context;66+ // A retry with the same key replays the first launch: the ids derive67+ // from the caller and the key, and the launch service replays a68+ // command it already accepted.69+ const commandId =
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/mcp/toolkits/project/handlers.ts line 85Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -59,5 +65,8 @@5965 (input, { runtimeMode, interactionMode }) =>6066 Effect.gen(function* () {6167 const context = yield* readCaller();62- const { caller } = context;63- const commandId = yield* newCommandId();68+ const { caller, scope } = context;69+ // A retry with the same key replays the first launch: the ids derive70+ // from the caller and the key, and the launch service replays a71+ // command it already accepted.72+ const commandId =
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
juliusmarminge added labelsagent-context-increase
juliusmarminge merged this888e444
juliusmarminge closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result:
d21f48d· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.