GeezerVison is showing github.com — fix(server): Claude no longer gets MCP app notes again after a server… · patroza/t3code@bf961f8
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/server/src/mcpApps/McpAppModelContext.ts +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,6 +19,8 @@ export interface McpAppModelContextEntry { | 19 | 19 | readonly server: string; | 20 | 20 | readonly tool: string; | 21 | 21 | readonly text: string; | | 22 | + /** ISO time the app last set the note. */ | | 23 | + readonly updatedAt: string; | 22 | 24 | } | 23 | 25 |
| 24 | 26 | export class McpAppModelContext extends Context.Service< | @@ -58,6 +60,7 @@ export const forProvider = Effect.fn("McpAppModelContext.forProvider")(function* | 58 | 60 | // the context in. | 59 | 61 | key: `mcp_app_${entry.itemId.replace(/[^\w.-]/g, "_")}`, | 60 | 62 | text: entry.text, | | 63 | + updatedAt: entry.updatedAt, | 61 | 64 | })); | 62 | 65 | }); | 63 | 66 |
| @@ -118,7 +121,8 @@ export const layer = Layer.effect( | 118 | 121 | LIMIT 1 | 119 | 122 | ) IS NULL | 120 | 123 | ) | 121 | | - SELECT context.item_id AS "itemId", context.server, context.tool, context.text | | 124 | + SELECT context.item_id AS "itemId", context.server, context.tool, context.text, | | 125 | + context.updated_at AS "updatedAt" | 122 | 126 | FROM mcp_app_model_context AS context | 123 | 127 | CROSS JOIN boundary | 124 | 128 | JOIN orchestration_v2_projection_turn_items AS item | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts +11-4Lines changed: 11 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -13071,6 +13071,7 @@ describe("AcpAdapterV2", () => { | 13071 | 13071 | const sessionId = providerThread.nativeThreadRef?.nativeId; | 13072 | 13072 | if (sessionId == null) return assert.fail("expected native session id"); | 13073 | 13073 | let ordinal = 0; | | 13074 | + const noteSetAt = "2026-11-23T14:02:17.000Z"; | 13074 | 13075 | const runTurn = (input: { | 13075 | 13076 | readonly text: string; | 13076 | 13077 | readonly note: string; | @@ -13091,7 +13092,7 @@ describe("AcpAdapterV2", () => { | 13091 | 13092 | ordinal, | 13092 | 13093 | messageText: input.text, | 13093 | 13094 | }), | 13094 | | - appContext: [{ key: "mcp_app_item-1", text: input.note }], | | 13095 | + appContext: [{ key: "mcp_app_item-1", text: input.note, updatedAt: noteSetAt }], | 13095 | 13096 | }); | 13096 | 13097 | const events = Array.from( | 13097 | 13098 | yield* runtime.events.pipe( | @@ -13106,7 +13107,9 @@ describe("AcpAdapterV2", () => { | 13106 | 13107 | }; | 13107 | 13108 | }); | 13108 | 13109 |
| 13109 | | - const tag = (note: string) => `<external_mcp_app_item-1>${note}</external_mcp_app_item-1>`; | | 13110 | + // Every send, a resend included, says when the app set the note. | | 13111 | + const tag = (note: string) => | | 13112 | + `<external_mcp_app_item-1 updated_at="${noteSetAt}">${note}</external_mcp_app_item-1>`; | 13110 | 13113 |
| 13111 | 13114 | // An unsuccessful stop reason must not mark appContext delivered. | 13112 | 13115 | const refusedTurn = yield* runTurn({ | @@ -13137,7 +13140,9 @@ describe("AcpAdapterV2", () => { | 13137 | 13140 | ordinal: interruptedOrdinal, | 13138 | 13141 | messageText: "Interrupted attempt", | 13139 | 13142 | }), | 13140 | | - appContext: [{ key: "mcp_app_item-1", text: "Created Jira issue PROJ-42" }], | | 13143 | + appContext: [ | | 13144 | + { key: "mcp_app_item-1", text: "Created Jira issue PROJ-42", updatedAt: noteSetAt }, | | 13145 | + ], | 13141 | 13146 | }); | 13142 | 13147 | yield* Deferred.await(interruptedStarted); | 13143 | 13148 | assert.include(prompts.at(-1) ?? "", tag("Created Jira issue PROJ-42")); | @@ -13237,7 +13242,9 @@ describe("AcpAdapterV2", () => { | 13237 | 13242 | ordinal: restartOrdinal, | 13238 | 13243 | messageText: "Trigger restart", | 13239 | 13244 | }), | 13240 | | - appContext: [{ key: "mcp_app_item-1", text: "Updated Jira issue PROJ-43" }], | | 13245 | + appContext: [ | | 13246 | + { key: "mcp_app_item-1", text: "Updated Jira issue PROJ-43", updatedAt: noteSetAt }, | | 13247 | + ], | 13241 | 13248 | }); | 13242 | 13249 | yield* Deferred.await(restartStarted); | 13243 | 13250 | const restartInterruptFiber = yield* runtime | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts +67-2Lines changed: 67 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7649,6 +7649,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { | 7649 | 7649 | close: (sdkMessages) => Queue.shutdown(sdkMessages), | 7650 | 7650 | freshQueueOnReopen: true, | 7651 | 7651 | }); | | 7652 | + const noteSetAt = "2026-11-23T14:02:17.000Z"; | 7652 | 7653 | const runTurn = Effect.fnUntraced(function* (ordinal: number, note: string) { | 7653 | 7654 | yield* harness.runtime.startTurn({ | 7654 | 7655 | ...makeClaudeTestTurnInput({ | @@ -7660,7 +7661,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { | 7660 | 7661 | text: "What did the app report?", | 7661 | 7662 | attachments: [], | 7662 | 7663 | }), | 7663 | | - appContext: [{ key: "mcp_app_item-1", text: note }], | | 7664 | + appContext: [{ key: "mcp_app_item-1", text: note, updatedAt: noteSetAt }], | 7664 | 7665 | }); | 7665 | 7666 | return lastOffered(); | 7666 | 7667 | }); | @@ -7731,7 +7732,11 @@ describe("ClaudeAdapterV2 background wake turns", () => { | 7731 | 7732 | ); | 7732 | 7733 | yield* finishTurn(4); | 7733 | 7734 | // Compaction summarizes the note away, so the next turn carries it again. | 7734 | | - assert.include(yield* runTurn(5, "Created Jira issue PROJ-43"), "PROJ-43"); | | 7735 | + // The resent note says when it was set, so it does not read as news. | | 7736 | + assert.include( | | 7737 | + yield* runTurn(5, "Created Jira issue PROJ-43"), | | 7738 | + `<external_mcp_app_item-1 updated_at="${noteSetAt}">Created Jira issue PROJ-43`, | | 7739 | + ); | 7735 | 7740 | }).pipe( | 7736 | 7741 | Effect.provide( | 7737 | 7742 | Layer.mergeAll( | @@ -7744,6 +7749,66 @@ describe("ClaudeAdapterV2 background wake turns", () => { | 7744 | 7749 | ), | 7745 | 7750 | ); | 7746 | 7751 |
| | 7752 | + // regression: #42982 a server restart resent every stored note to a session that already had it | | 7753 | + it.effect("does not resend an MCP app note Claude already has after the adapter restarts", () => | | 7754 | + Effect.gen(function* () { | | 7755 | + const note = "Slack draft card: the message was sent."; | | 7756 | + const startTurn = Effect.fnUntraced(function* ( | | 7757 | + harness: Effect.Success<ReturnType<typeof makeWakeHarnessWithOptions>>, | | 7758 | + providerThread: OrchestrationV2ProviderThread, | | 7759 | + ordinal: number, | | 7760 | + ) { | | 7761 | + yield* harness.runtime.startTurn({ | | 7762 | + ...makeClaudeTestTurnInput({ | | 7763 | + threadId: harness.threadId, | | 7764 | + providerThread, | | 7765 | + now: yield* DateTime.now, | | 7766 | + attemptId: RunAttemptId.make(`mcp-app-restart-${ordinal}`), | | 7767 | + providerTurnOrdinal: ordinal, | | 7768 | + text: "Anything new?", | | 7769 | + attachments: [], | | 7770 | + }), | | 7771 | + appContext: [{ key: "mcp_app_item-1", text: note }], | | 7772 | + }); | | 7773 | + const content = harness.offeredMessages.at(-1)?.message.content; | | 7774 | + return typeof content === "string" | | 7775 | + ? content | | 7776 | + : (content ?? []).map((block) => (block.type === "text" ? block.text : "")).join("\n"); | | 7777 | + }); | | 7778 | + | | 7779 | + const before = yield* makeWakeHarnessWithOptions({ | | 7780 | + close: (sdkMessages) => Queue.shutdown(sdkMessages), | | 7781 | + freshQueueOnReopen: true, | | 7782 | + }); | | 7783 | + assert.include(yield* startTurn(before, before.providerThread, 0), note); | | 7784 | + yield* before.offerAndWait( | | 7785 | + makeResultFrame({ uuid: "mcp-app-restart-result-0", result: "Done." }), | | 7786 | + ); | | 7787 | + yield* Queue.take(before.terminalReceipts); | | 7788 | + const persisted = before.events | | 7789 | + .filter((event) => event.type === "provider_thread.updated") | | 7790 | + .at(-1)?.providerThread; | | 7791 | + assert.isDefined(persisted); | | 7792 | + | | 7793 | + // A new adapter resumes the same native session, whose history already holds the note. | | 7794 | + const after = yield* makeWakeHarnessWithOptions({ | | 7795 | + close: (sdkMessages) => Queue.shutdown(sdkMessages), | | 7796 | + freshQueueOnReopen: true, | | 7797 | + }); | | 7798 | + assert.notInclude(yield* startTurn(after, persisted!, 1), note); | | 7799 | + }).pipe( | | 7800 | + Effect.scoped, | | 7801 | + Effect.provide( | | 7802 | + Layer.mergeAll( | | 7803 | + IdAllocator.layer, | | 7804 | + McpProviderSessions.layer, | | 7805 | + NodeServices.layer, | | 7806 | + NodeCrypto.layer, | | 7807 | + ), | | 7808 | + ), | | 7809 | + ), | | 7810 | + ); | | 7811 | + | 7747 | 7812 | it.effect("sends the model id Claude Code reported for the selected catalog model", () => | 7748 | 7813 | Effect.scoped( | 7749 | 7814 | Effect.gen(function* () { | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +62-19Lines changed: 62 additions & 19 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -141,6 +141,8 @@ import { | 141 | 141 | } from "@t3tools/contracts"; | 142 | 142 |
| 143 | 143 | import { FILE_HEADERS_ONLY, formatPatch, structuredPatch } from "diff"; | | 144 | +// @effect-diagnostics-next-line nodeBuiltinImport:off -- A synchronous digest inside the pure note filter. | | 145 | +import * as NodeCrypto from "node:crypto"; | 144 | 146 | import * as Cause from "effect/Cause"; | 145 | 147 | import * as Predicate from "effect/Predicate"; | 146 | 148 | import * as Clock from "effect/Clock"; | @@ -3411,22 +3413,44 @@ const reserveClaudePdfBudget = ( | 3411 | 3413 | }).pipe(Effect.andThen(persist)), | 3412 | 3414 | ); | 3413 | 3415 |
| | 3416 | +type ClaudeAppContext = NonNullable<ProviderAdapter.ProviderAdapterV2TurnInput["appContext"]>; | | 3417 | + | | 3418 | +// Digests keep the persisted record of delivered notes small; notes can be 16 KiB each. | | 3419 | +const claudeAppContextDigests = (appContext: ClaudeAppContext): ReadonlyMap<string, string> => | | 3420 | + new Map( | | 3421 | + appContext.map((entry) => [ | | 3422 | + entry.key, | | 3423 | + NodeCrypto.createHash("sha256").update(entry.text).digest("base64url"), | | 3424 | + ]), | | 3425 | + ); | | 3426 | + | | 3427 | +const unseenClaudeAppContext = ( | | 3428 | + appContext: ClaudeAppContext, | | 3429 | + seen: ReadonlyMap<string, string> | undefined, | | 3430 | +): ClaudeAppContext => { | | 3431 | + const digests = claudeAppContextDigests(appContext); | | 3432 | + return appContext.filter((entry) => seen?.get(entry.key) !== digests.get(entry.key)); | | 3433 | +}; | | 3434 | + | 3414 | 3435 | // MCP app notes are app-written, so they go as quoted user input like Codex's untrusted context. | 3415 | 3436 | // A slash command runs only when it opens a plain-text prompt; its note waits for the next turn. | 3416 | 3437 | // Returns `message` itself when it adds nothing. | 3417 | 3438 | const withClaudeAppContext = ( | 3418 | 3439 | message: SDKUserMessage, | 3419 | | - appContext: NonNullable<ProviderAdapter.ProviderAdapterV2TurnInput["appContext"]>, | | 3440 | + appContext: ClaudeAppContext, | 3420 | 3441 | reservation: Effect.Success<ReturnType<typeof reserveClaudePdfBudget>>, | 3421 | 3442 | ): SDKUserMessage => { | 3422 | 3443 | const content = message.message.content; | 3423 | 3444 | if (appContext.length === 0 || (typeof content === "string" && content.startsWith("/"))) { | 3424 | 3445 | return message; | 3425 | 3446 | } | 3426 | | - const contextBlocks = appContext.map((entry) => ({ | 3427 | | - type: "text" as const, | 3428 | | - text: `<external_${entry.key}>${entry.text}</external_${entry.key}>`, | 3429 | | - })); | | 3447 | + const contextBlocks = appContext.map((entry) => { | | 3448 | + const updatedAt = entry.updatedAt === undefined ? "" : ` updated_at="${entry.updatedAt}"`; | | 3449 | + return { | | 3450 | + type: "text" as const, | | 3451 | + text: `<external_${entry.key}${updatedAt}>${entry.text}</external_${entry.key}>`, | | 3452 | + }; | | 3453 | + }); | 3430 | 3454 | const bytes = Buffer.byteLength(encodeClaudeJson(contextBlocks)); | 3431 | 3455 | reservation.budget.pending.bytes += bytes; | 3432 | 3456 | reservation.bytes += bytes; | @@ -6358,7 +6382,8 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 6358 | 6382 | // Sessions Claude Code reported gone on resume; resumeThread fails them into a fresh session. | 6359 | 6383 | const missingNativeThreads = new Set<string>(); | 6360 | 6384 | const pdfBudgets = new Map<string, ReturnType<typeof makeClaudeAttachmentBudget>>(); | 6361 | | - // MCP app notes already in each native session's history, by key. Cleared when it compacts. | | 6385 | + // Digests of MCP app notes already in each native session's history, by key. Cleared when it | | 6386 | + // compacts; persisted in native metadata so a restarted server does not resend them. | 6362 | 6387 | const deliveredAppContext = new Map<string, ReadonlyMap<string, string>>(); | 6363 | 6388 | const latestPlanByKind = yield* Ref.make(new Map<string, OrchestrationV2PlanArtifact>()); | 6364 | 6389 | // Claude 5 task tools edit one list per native session, across turns. | @@ -6699,13 +6724,24 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 6699 | 6724 | const budget = pdfBudgets.get(nativeThreadId); | 6700 | 6725 | const hasAppliedTitle = appliedSessionTitles.has(nativeThreadId); | 6701 | 6726 | const recordedTitle = providerThread.nativeMetadata?.title; | 6702 | | - if (budget === undefined && !hasAppliedTitle && recordedTitle === undefined) { | | 6727 | + const delivered = deliveredAppContext.get(nativeThreadId); | | 6728 | + if ( | | 6729 | + budget === undefined && | | 6730 | + !hasAppliedTitle && | | 6731 | + recordedTitle === undefined && | | 6732 | + delivered === undefined | | 6733 | + ) { | 6703 | 6734 | return providerThread; | 6704 | 6735 | } | | 6736 | + const { claudeDeliveredAppContext: _recorded, ...nativeMetadata } = | | 6737 | + providerThread.nativeMetadata ?? {}; | 6705 | 6738 | return { | 6706 | 6739 | ...providerThread, | 6707 | 6740 | nativeMetadata: { | 6708 | | - ...providerThread.nativeMetadata, | | 6741 | + ...(delivered === undefined ? providerThread.nativeMetadata : nativeMetadata), | | 6742 | + ...(delivered === undefined || delivered.size === 0 | | 6743 | + ? {} | | 6744 | + : { claudeDeliveredAppContext: Object.fromEntries(delivered) }), | 6709 | 6745 | ...(budget === undefined | 6710 | 6746 | ? {} | 6711 | 6747 | : { | @@ -11635,7 +11671,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 11635 | 11671 |
| 11636 | 11672 | // Every trigger discards the conversation, so reset whatever the trigger is. | 11637 | 11673 | if (message.type === "conversation_reset") { | 11638 | | - deliveredAppContext.delete(context.nativeThreadId); | | 11674 | + deliveredAppContext.set(context.nativeThreadId, new Map()); | 11639 | 11675 | context.appContextOffered = undefined; | 11640 | 11676 | if (context.streamUsage !== null) context.streamUsage.usage = null; | 11641 | 11677 | context.compactionTokens = 0; | @@ -11706,7 +11742,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 11706 | 11742 | budget.compacting = null; | 11707 | 11743 | yield* persistAttachmentBudget(context.nativeThreadId); | 11708 | 11744 | } | 11709 | | - deliveredAppContext.delete(context.nativeThreadId); | | 11745 | + deliveredAppContext.set(context.nativeThreadId, new Map()); | 11710 | 11746 | context.appContextOffered = undefined; | 11711 | 11747 | if (context.streamUsage !== null) context.streamUsage.usage = null; | 11712 | 11748 | const postTokens = message.compact_metadata.post_tokens; | @@ -14078,6 +14114,12 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 14078 | 14114 | const used = turnInput.providerThread.nativeMetadata?.claudeAttachmentBudget; | 14079 | 14115 | pdfBudgets.set(nativeThreadId, makeClaudeAttachmentBudget(used)); | 14080 | 14116 | } | | 14117 | + if (!deliveredAppContext.has(nativeThreadId)) { | | 14118 | + const recorded = turnInput.providerThread.nativeMetadata?.claudeDeliveredAppContext; | | 14119 | + if (recorded !== undefined) { | | 14120 | + deliveredAppContext.set(nativeThreadId, new Map(Object.entries(recorded))); | | 14121 | + } | | 14122 | + } | 14081 | 14123 | if (!appliedSessionTitles.has(nativeThreadId)) { | 14082 | 14124 | const recordedTitle = turnInput.providerThread.nativeMetadata?.title; | 14083 | 14125 | if (recordedTitle !== undefined && recordedTitle !== null) { | @@ -14135,7 +14177,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 14135 | 14177 | Effect.map((message) => { | 14136 | 14178 | const withContext = withClaudeAppContext( | 14137 | 14179 | message, | 14138 | | - appContext.filter((entry) => delivered?.get(entry.key) !== entry.text), | | 14180 | + unseenClaudeAppContext(appContext, delivered), | 14139 | 14181 | pdfReservation, | 14140 | 14182 | ); | 14141 | 14183 | appContextSent = withContext !== message; | @@ -14298,9 +14340,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 14298 | 14340 | offerCommitted = true; | 14299 | 14341 | pdfReservation.commit(); | 14300 | 14342 | if (appContextSent) { | 14301 | | - context.appContextOffered = new Map( | 14302 | | - appContext.map((entry) => [entry.key, entry.text]), | 14303 | | - ); | | 14343 | + context.appContextOffered = claudeAppContextDigests(appContext); | 14304 | 14344 | } | 14305 | 14345 | }; | 14306 | 14346 | const offerUserMessage = | @@ -14704,16 +14744,14 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 14704 | 14744 | currentTurn.appContextOffered ?? deliveredAppContext.get(existing.nativeThreadId); | 14705 | 14745 | const userMessage = withClaudeAppContext( | 14706 | 14746 | steerMessage, | 14707 | | - appContext.filter((entry) => seenAppContext?.get(entry.key) !== entry.text), | | 14747 | + unseenClaudeAppContext(appContext, seenAppContext), | 14708 | 14748 | pdfReservation, | 14709 | 14749 | ); | 14710 | 14750 | // `offer` may call this twice; a second call must not restore notes compaction cleared. | 14711 | 14751 | let offerCommitted = false; | 14712 | 14752 | const appContextBefore = currentTurn.appContextOffered; | 14713 | 14753 | const appContextOffered = | 14714 | | - userMessage === steerMessage | 14715 | | - ? undefined | 14716 | | - : new Map(appContext.map((entry) => [entry.key, entry.text])); | | 14754 | + userMessage === steerMessage ? undefined : claudeAppContextDigests(appContext); | 14717 | 14755 | const commitOffer = () => { | 14718 | 14756 | if (offerCommitted) return; | 14719 | 14757 | offerCommitted = true; | @@ -15436,7 +15474,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 15436 | 15474 | const nativeThreadId = yield* getNativeThreadId(rollbackInput.providerThread); | 15437 | 15475 | yield* closeLiveQueryForNativeThread(nativeThreadId); | 15438 | 15476 | // The rewound history may no longer hold the turns that carried app notes. | 15439 | | - deliveredAppContext.delete(nativeThreadId); | | 15477 | + deliveredAppContext.set(nativeThreadId, new Map()); | 15440 | 15478 | const now = yield* DateTime.now; | 15441 | 15479 | const resumeSessionAt = yield* resolveClaudeRollbackResumeSessionAt(rollbackInput); | 15442 | 15480 |
| @@ -15465,9 +15503,14 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 15465 | 15503 | }; | 15466 | 15504 | } | 15467 | 15505 |
| | 15506 | + const { claudeDeliveredAppContext: _delivered, ...nativeMetadata } = | | 15507 | + rollbackInput.providerThread.nativeMetadata ?? {}; | 15468 | 15508 | return { | 15469 | 15509 | providerThread: { | 15470 | 15510 | ...rollbackInput.providerThread, | | 15511 | + ...(rollbackInput.providerThread.nativeMetadata === null | | 15512 | + ? {} | | 15513 | + : { nativeMetadata }), | 15471 | 15514 | providerSessionId: input.providerSessionId, | 15472 | 15515 | nativeConversationHeadRef: | 15473 | 15516 | resumeSessionAt === null | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ProviderTurnControlService.test.ts +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -438,6 +438,7 @@ it.effect("steers a running turn with its sender and the thread's MCP app model | 438 | 438 | server: "tools", | 439 | 439 | tool: "picker", | 440 | 440 | text: "Pressed: blue", | | 441 | + updatedAt: "2026-11-23T14:02:17.000Z", | 441 | 442 | }, | 442 | 443 | ]), | 443 | 444 | }), | @@ -462,7 +463,11 @@ it.effect("steers a running turn with its sender and the thread's MCP app model | 462 | 463 | '[T3 Code: the agent in T3 thread "thread:steer-sender" sent this message, not the user.]\n\nWhat did the app report?', | 463 | 464 | ); | 464 | 465 | assert.deepEqual("appContext" in steered[0]! ? steered[0].appContext : undefined, [ | 465 | | - { key: "mcp_app_turn-item_call-1", text: "Pressed: blue" }, | | 466 | + { | | 467 | + key: "mcp_app_turn-item_call-1", | | 468 | + text: "Pressed: blue", | | 469 | + updatedAt: "2026-11-23T14:02:17.000Z", | | 470 | + }, | 466 | 471 | ]); | 467 | 472 | }), | 468 | 473 | ); |
|