Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(cursor): background commands survive the turn and wake the agent when they exit #38348

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 17 commits intomain fromrefs/pull/38348/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 21 changed files with 19 additions and 3 deletions (loading 17).

x
0 of 21 viewed, 21 left
2 additions and 2 deletionsapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -145,7 +145,7 @@
​
const BackgroundWaitTool = Tool.make("t3_background_wait", {
description:
- "Keep this thread in Working while background work runs. Pass its task ID once started. Not for work left running (dev server, watcher). `waiting=false` clears. Doesn't stop tasks. Claude/OpenCode only.",
+ "Keep this thread in Working while background work runs. Pass its task ID once started. Not for work left running (dev server, watcher). `waiting=false` clears. Doesn't stop tasks.",
parameters: Schema.Struct({
taskIds: Schema.Array(TrimmedNonEmptyString).check(
Schema.isMinLength(1),
@@ -165,7 +165,7 @@
// Only marks which tasks keep the thread Working; Claude Plan mode blocks tools without this.
.annotate(Tool.Readonly, true)
.annotate(Tool.Destructive, false)
- .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenFromOutsideClients);
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutBackgroundWait);
​
const ScheduleTaskTool = Tool.make("schedule_task", {
description:
7 additions and 1 deletionapps/server/src/mcp/toolkits/core.test.tsModified
View file
@@ -1299,7 +1299,13 @@
const result = yield* server
.callTool({ name: "t3_background_wait", arguments: { taskIds: ["checks"] } })
.pipe(
- Effect.provideService(McpInvocationContext.McpInvocationContext, scope),
+ Effect.provideService(McpInvocationContext.McpInvocationContext, {
+ ...scope,