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.
Fix is up in #27983. It reproduces this in the running app and resolves the base ref from the default branch. The
lastRunStatuspart of this report is a separate problem and is not covered there.