feat(mcp): schedule_task can run new-thread tasks in the project checkout #39760
Openipanasenko(GitHub profile, opens in a new tab)wants to merge 18 commits into
main fromrefs/pull/39760/headopened View on GitHubtanstack-source added labelsfeature
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -1,4 +1,4 @@11 {22 "claudeSystemAppendBytes": 6245,33 "codexAdditionalContextBytes": 7639,4- "mcpToolListJsonBytes": 572994+ "mcpToolListJsonBytes": 57480
Pushed36872fc
- @@ -58,3 +58,4 @@5858 {"id": "control-ci-why-no-rerun", "area": "pull-requests", "kind": "control", "pattern": "question about a failing check", "experience": "Control: the user asks why CI failed. Reading the log is right; re-running it was not asked.", "rule": "Re-run only when asked", "privacy": "commit-safe", "setup": {"role": "top", "world": {"branch": "fix/retry-queue", "commits": [{"sha": "9f3c2a1", "subject": "fix(queue): retry a failed job once"}], "diff": "diff --git a/src/queue.ts b/src/queue.ts\n--- a/src/queue.ts\n+++ b/src/queue.ts\n@@ -4,3 +4,4 @@ export async function run(job: Job) {\n try {\n return await job.execute();\n- } catch {\n+ } catch (error) {\n+ if (job.attempts > 1) throw error;\n return run({ ...job, attempts: job.attempts + 1 });\n", "files": {"src/queue.ts": "export async function run(job: Job) {\n try {\n return await job.execute();\n } catch (error) {\n if (job.attempts > 1) throw error;\n return run({ ...job, attempts: job.attempts + 1 });\n }\n}5959 {"id": "land-stack-in-one-merge", "area": "pull-requests", "kind": "bad", "pattern": "a green, approved stack merged layer by layer or through gh stack merge", "experience": "Asked to land a two-PR stack, the agent had only a one-PR merge tool, so it merged the bottom layer alone, which restarts CI on the layer above, or fell back to gh stack merge in the shell.", "rule": "pull_request_merge stack:true on the top PR merges every layer below it at once.", "privacy": "commit-safe", "setup": {"role": "top", "context": "PR #124 (feature/error-detail, on main) and PR #125 (feature/frozen-host, on top of #124) form a native GitHub stack and are linked to this thread.", "world": {"repo": "acme/app", "branch": "feature/frozen-host", "stack": 300, "linkedPullRequests": [{"number": 124, "state": "open", "title": "feat(server): include the failing step in connection errors"}, {"number": 125, "state": "open", "title": "feat(server): detect a frozen host and say so"}], "prs": [{"number": 124, "titl6060 {"id": "watch-for-teammate-merge-no-own-poll", "area": "pull-requests", "kind": "bad", "pattern": "assumes a merge will not wake it, so polls or asks the user", "experience": "Told a teammate would merge the PR and asked to report when it merged, agents read watch_pull_request's wake list (checks, comments, conflicts), concluded a merge would not wake them, and ran their own polling or asked the user to check back.", "rule": "watch_pull_request: T3 wakes you on ... and once on merge or close unless you did it via CLI", "privacy": "commit-safe", "setup": {"role": "top", "priorTurns": [{"role": "user", "text": "The HTML preview frame has no accessible name. Fix it and open a PR."}, {"role": "assistant", "text": "Opened [PR #124](https://github.com/acme/app/pull/124). The preview frame now has the title \"HTML preview\".", "toolCalls": [{"tool": "Bash", "input": {"command": "git push -u origin fix/html-preview-title && gh pr create --fill"}, "result": "https://github.com/acme/app/pull/12461+{"id": "schedule-new-thread-in-checkout", "area": "pull-requests", "kind": "bad", "pattern": "workspace asked, agent defers it to Settings", "experience": "Asked for a daily task that starts a new thread each run in the project checkout, agents created it with a new worktree per run and asked the user to switch Workspace to 'Use the project checkout' in Settings, because schedule_task had no workspace input.", "source": {"issue": "https://github.com/pingdotgg/t3code/issues/32491", "note": "Scheduled runs that had to share the project checkout asked the user, again and again, to set Workspace in Settings."}, "rule": "schedule_task workspace: Unbound only: the project checkout, or a new worktree per run (default).", "privacy": "commit-safe", "setup": {"role": "top", "context": "Today is Friday 2026-11-20, 15:00 local time.", "mocks": {"schedule_task": {"scheduledTaskId": "scheduled-task-7", "title": "Upload i18n screenshots", "prompt": "Run scripts/i18n-screenshots.sh and upload the resu
Pushed355ee77
- @@ -58,3 +58,4 @@5858 {"id": "control-ci-why-no-rerun", "area": "pull-requests", "kind": "control", "pattern": "question about a failing check", "experience": "Control: the user asks why CI failed. Reading the log is right; re-running it was not asked.", "rule": "Re-run only when asked", "privacy": "commit-safe", "setup": {"role": "top", "world": {"branch": "fix/retry-queue", "commits": [{"sha": "9f3c2a1", "subject": "fix(queue): retry a failed job once"}], "diff": "diff --git a/src/queue.ts b/src/queue.ts\n--- a/src/queue.ts\n+++ b/src/queue.ts\n@@ -4,3 +4,4 @@ export async function run(job: Job) {\n try {\n return await job.execute();\n- } catch {\n+ } catch (error) {\n+ if (job.attempts > 1) throw error;\n return run({ ...job, attempts: job.attempts + 1 });\n", "files": {"src/queue.ts": "export async function run(job: Job) {\n try {\n return await job.execute();\n } catch (error) {\n if (job.attempts > 1) throw error;\n return run({ ...job, attempts: job.attempts + 1 });\n }\n}5959 {"id": "land-stack-in-one-merge", "area": "pull-requests", "kind": "bad", "pattern": "a green, approved stack merged layer by layer or through gh stack merge", "experience": "Asked to land a two-PR stack, the agent had only a one-PR merge tool, so it merged the bottom layer alone, which restarts CI on the layer above, or fell back to gh stack merge in the shell.", "rule": "pull_request_merge stack:true on the top PR merges every layer below it at once.", "privacy": "commit-safe", "setup": {"role": "top", "context": "PR #124 (feature/error-detail, on main) and PR #125 (feature/frozen-host, on top of #124) form a native GitHub stack and are linked to this thread.", "world": {"repo": "acme/app", "branch": "feature/frozen-host", "stack": 300, "linkedPullRequests": [{"number": 124, "state": "open", "title": "feat(server): include the failing step in connection errors"}, {"number": 125, "state": "open", "title": "feat(server): detect a frozen host and say so"}], "prs": [{"number": 124, "titl6060 {"id": "watch-for-teammate-merge-no-own-poll", "area": "pull-requests", "kind": "bad", "pattern": "assumes a merge will not wake it, so polls or asks the user", "experience": "Told a teammate would merge the PR and asked to report when it merged, agents read watch_pull_request's wake list (checks, comments, conflicts), concluded a merge would not wake them, and ran their own polling or asked the user to check back.", "rule": "watch_pull_request: T3 wakes you on ... and once on merge or close unless you did it via CLI", "privacy": "commit-safe", "setup": {"role": "top", "priorTurns": [{"role": "user", "text": "The HTML preview frame has no accessible name. Fix it and open a PR."}, {"role": "assistant", "text": "Opened [PR #124](https://github.com/acme/app/pull/124). The preview frame now has the title \"HTML preview\".", "toolCalls": [{"tool": "Bash", "input": {"command": "git push -u origin fix/html-preview-title && gh pr create --fill"}, "result": "https://github.com/acme/app/pull/12461+{"id": "schedule-new-thread-in-checkout", "area": "pull-requests", "kind": "bad", "pattern": "workspace asked, agent defers it to Settings", "experience": "Asked for a daily task that starts a new thread each run in the project checkout, agents created it with a new worktree per run and asked the user to switch Workspace to 'Use the project checkout' in Settings, because schedule_task had no workspace input.", "source": {"issue": "https://github.com/pingdotgg/t3code/issues/32491", "note": "Scheduled runs that had to share the project checkout asked the user, again and again, to set Workspace in Settings."}, "rule": "schedule_task workspace: Unbound only: the project checkout, or a new worktree per run (default).", "privacy": "commit-safe", "setup": {"role": "top", "context": "Today is Friday 2026-11-20, 15:00 local time.", "mocks": {"schedule_task": {"scheduledTaskId": "scheduled-task-7", "title": "Upload i18n screenshots", "prompt": "Run scripts/i18n-screenshots.sh and upload the resu
Sign in to join this conversation.


Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
Walkthrough
Scheduled tasks now accept checkout or worktree workspace choices. The service applies workspace strategies during creation and updates, enforces thread-binding constraints, and reports workspace data for unbound tasks.
Changes: Scheduled-task workspace selection
packages/contracts/src/orchestratorMcp.tscheckoutorworktree. Task results also acceptexisting_worktree.apps/server/src/mcp/OrchestratorMcpService.ts,apps/server/src/mcp/toolkits/orchestrator/handlers.ts,apps/server/src/provider/agentContextBudget.jsonapps/server/src/mcp/OrchestratorMcpService.test.ts,docs/orchestration-v2/orchestrator-mcp-server.md,evals/mcp-tool-use/cases/pull-requests.ndjsonEstimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Sequence Diagram(s)#
Possibly related PRs
schedule_task. Both changes modify the tool input contract and binding-dependent update behavior.Suggested reviewers:
macroscopeapp,juliusmarminge,gabrielelpidioMerge Risk:
Moderate · previous review
cec0cThe new schedule_task workspace option works as described, but the Agent Context Budget check still fails on a 150-byte growth in tool-list text. A maintainer needs to apply the agent-context-increase label or the text needs to shrink before merge. The description of the worktree default is slightly imprecise for updates that stay unbound.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: schedule_task gains a workspace option so new-thread scheduled tasks can run in the project checkout. It follows the conventional commit form and is specific. The scope is limited to the MCP tool, which matches the changeset.
Full details: Description check
Explanation
The description supplies a clear problem statement, a concrete change with a diff, scope rationale with linked issues, and detailed verification (unit test table, eval cases, end-to-end dev-app run with saved-state evidence). It does not follow the template's headings exactly: the top-level comment block is replaced by an intro paragraph, and the 'Merge danger' section is extra. The Scope section links prior issues but does not explicitly say why a feature-like addition qualifies as a bug fix, which the template asks for. The agent-model attribution at the end is present. Overall the description is mostly complete and substantive.
Finishing Touches
Generate unit tests (beta)
Fix failing CI checks
1be26b31-638e-43b9-a7fc-7e43e1d27650Reviewing files that changed from the base of the PR and between 212b59632c440eb26c4cc13579e2f9015c897a80 and cec0c06d7d7fb1532ba3240b3f90c407797d2c60.
evals/mcp-tool-use/cases/pull-requests.ndjsonIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.