Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): delegated children no longer see pull request watch tools #24808

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/24808/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 6 changed files with 106 additions and 3 deletions (loading 3).

x
0 of 6 viewed, 6 left
6 additions and 3 deletionsapps/server/src/mcp/toolkits/pullRequests/tools.tsModified
View file
@@ -10,6 +10,7 @@
ThreadId,
} from "@t3tools/contracts";
import * as Schema from "effect/Schema";
+import * as McpSchema from "effect/ai/McpSchema";
import * as Tool from "effect/ai/Tool";
import * as Toolkit from "effect/ai/Toolkit";
​
@@ -326,7 +327,7 @@
​
const WatchPullRequestTool = Tool.make("watch_pull_request", {
description:
- "Have T3 Code watch an open pull request for this thread, linking it first if needed. T3 Code checks it every two minutes and wakes you with a message when a check fails, the required checks pass, someone else comments or reviews, or the branch starts to conflict with its base. Use this to monitor or babysit a pull request instead of polling, sleeping, or running a watcher. Only comments posted after this call wake you, so handle the existing ones first, then end your turn. A wake is news, not a merge decision: check readiness yourself before merging. While T3 Code watches, the thread stays in the user's Working list, not their inbox. When you hand the work back to the user, call unwatch_pull_request first so the thread returns to their inbox. Watching ends when the pull request merges or closes, when its thread settles or is archived, when T3 Code fails to read it 8 times in a row (a host rate limit only delays it), when the user stops this thread, or when you call unwatch_pull_request. Unsettle the thread before starting a new watch. A subagent cannot watch: its parent thread owns the pull request.",
+ "Have T3 Code watch an open pull request for this thread, linking it first if needed. T3 Code checks it every two minutes and wakes you with a message when a check fails, the required checks pass, someone else comments or reviews, or the branch starts to conflict with its base. Use this to monitor or babysit a pull request instead of polling, sleeping, or running a watcher. Only comments posted after this call wake you, so handle the existing ones first, then end your turn. A wake is news, not a merge decision: check readiness yourself before merging. While T3 Code watches, the thread stays in the user's Working list, not their inbox. When you hand the work back to the user, call unwatch_pull_request first so the thread returns to their inbox. Watching ends when the pull request merges or closes, when its thread settles or is archived, when T3 Code fails to read it 8 times in a row (a host rate limit only delays it), when the user stops this thread, or when you call unwatch_pull_request. Unsettle the thread before starting a new watch.",
parameters: PullRequestTargetInput,
success: WatchPullRequestResult,
failure: PullRequestToolError,
@@ -336,7 +337,8 @@
.annotate(Tool.Readonly, false)
.annotate(Tool.Destructive, false)
.annotate(Tool.Idempotent, true)
- .annotate(Tool.OpenWorld, false);
+ .annotate(Tool.OpenWorld, false)
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenFromSubagents);
​
const UnwatchPullRequestTool = Tool.make("unwatch_pull_request", {
description: