Skip to content

Commit 411e9b4

Browse files
committed
fix(server): schedule_task no longer tells agents bindToCurrentThread always defaults to true
1 parent 3c68642 commit 411e9b4

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎apps/server/src/mcp/toolkits/orchestrator/tools.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ it("states t3_thread_read page size limits in the parameter descriptions", () =>
1717
}
1818
});
1919

20+
// The server binds an omitted bindToCurrentThread only in the caller's own project;
21+
// the schema description is the only place a model sees that default.
22+
it("states the conditional bindToCurrentThread default in the schedule_task schema", () => {
23+
const schema = Tool.getJsonSchema(OrchestratorToolkit.tools.schedule_task) as {
24+
readonly properties: Readonly<Record<string, unknown>>;
25+
};
26+
const serialized = JSON.stringify(schema.properties.bindToCurrentThread);
27+
expect(serialized).toContain("this thread's own project");
28+
expect(serialized).not.toContain("Default true: runs post in this thread.");
29+
});
30+
2031
it("refuses a t3_thread_update whose fields do not fit its action", () => {
2132
const decode = Schema.decodeUnknownExit(
2233
OrchestratorToolkit.tools.t3_thread_update.parametersSchema,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"claudeSystemAppendBytes": 5597,
33
"codexAdditionalContextBytes": 7327,
4-
"mcpToolListJsonBytes": 48131
4+
"mcpToolListJsonBytes": 48236
55
}

‎packages/contracts/src/orchestratorMcp.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ export const OrchestratorMcpScheduleTaskInput = Schema.Struct({
673673
enabled: Schema.optional(Schema.Boolean.annotate({ description: "Default true." })),
674674
bindToCurrentThread: Schema.optional(
675675
Schema.Boolean.annotate({
676-
description: "Default true: runs post in this thread. False: new thread per run.",
676+
description:
677+
"Omitted: runs post in this thread when the task is in this thread's own project; otherwise a new thread per run. True: runs post in this thread. False: new thread per run.",
677678
}),
678679
),
679680
freshSession: Schema.optional(

0 commit comments

Comments
 (0)