@devries-cameron20 / t3code-1 / commits / 18866e52e4
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): schedule_task updates apply freshSession (#34801)

Julius Marminge committed Nov 11, 2026 at 23:06 UTC 18866e52e43e055746059efd1eae0633cfb42a09
2 files changed +7 -1
apps/server/src/mcp/toolkits/core.test.ts
+5
@@ -718,6 +718,11 @@ it.effect("a caller cannot rewrite a scheduled task that runs above its own mode
718 enabled: false,
719 });
720 expect(allowed.isError).toBe(false);
721 + const fresh = yield* call("schedule_task", {
722 + scheduledTaskId: "task-auto",
723 + freshSession: true,
724 + });
725 + expect(fresh.structuredContent).toMatchObject({ freshSession: true });
726 const incomplete = yield* call("schedule_task", { prompt: "Run nightly" });
727 expect(declaredFailure(incomplete)).toMatchObject({ code: "invalid_request" });
728 }).pipe(
apps/server/src/mcp/toolkits/orchestrator/handlers.ts
+2 -1
@@ -102,7 +102,7 @@ const handlers = {
102 { refused: "schedule tasks in this environment" },
103 ),
104 McpToolAccess.writes(
105 - ({ scheduledTaskId, prompt, title, schedule, enabled, bindToCurrentThread }) =>
105 + ({ scheduledTaskId, prompt, title, schedule, enabled, freshSession, bindToCurrentThread }) =>
106 Effect.gen(function* () {
107 if (scheduledTaskId === undefined) return yield* Effect.die("unreachable");
108 const scope = yield* McpInvocationContext.McpInvocationContext;
@@ -113,6 +113,7 @@ const handlers = {
113 title,
114 schedule,
115 enabled,
116 + freshSession,
117 bindToCurrentThread,
118 });
119 }),