Skip to content
Source
Sign inSign up
pingdotgg/t3code

Unbound scheduled tasks always fail on repos whose default branch isn't "main" #27488

Closeddimitriosbleh-afk(GitHub profile, opens in a new tab) opened this issue 1 comment

scheduledTaskWorkspaceStrategy in apps/server/src/mcp/OrchestratorMcpService.ts hardcodes baseRef "main" for tasks with bindToCurrentThread false. In a repo whose default branch is "master" (no main, no origin/main), every run fails before the prompt starts:

Workspace preparation failed during provision worktree: Git command failed in GitVcsDriver.createWorktree.createBranch: git worktree add failed (ref_not_found)

The scheduled task list still reports lastRunStatus "succeeded" for these runs.

Expected: use the project's default branch, the way resolvePrBase already does (provider default, then the remote's default branch).

Workaround: bind the task to a thread, which runs in the project root.

  1. Fix is up in #27983. It reproduces this in the running app and resolves the base ref from the default branch. The lastRunStatus part of this report is a separate problem and is not covered there.

  2. maria-rcks closed this

Sign in to join this conversation.