Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mcp): agents can switch a scheduled task to fresh sessions #31696

ClosedMezzle(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/31696/headopened View on GitHub

Showing 2 changed files with 17 additions and 4 deletions.

x
0 of 2 viewed, 2 left
2 additions and 1 deletionapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -101,7 +101,7 @@
{ refused: "schedule tasks in this environment" },
McpToolAccess.writes(
- ({ scheduledTaskId, prompt, title, schedule, enabled, bindToCurrentThread }) =>
+ ({ scheduledTaskId, prompt, title, schedule, enabled, freshSession, bindToCurrentThread }) =>
Effect.gen(function* () {
if (scheduledTaskId === undefined) return yield* Effect.die("unreachable");
const scope = yield* McpInvocationContext.McpInvocationContext;
@@ -112,6 +112,7 @@
title,
schedule,
enabled,
+ freshSession,
bindToCurrentThread,
});
}),
15 additions and 3 deletionsapps/server/src/mcp/toolkits/core.test.tsModified
View file
@@ -15,6 +15,7 @@
RunId,
ScheduledTaskError,
ScheduledTask,
+ type ScheduledTaskUpsertInput,
RuntimeRequestId,
ThreadId,
TurnItemId,