The same hard-coded strategy also breaks the "No project" (scratch) project. That project isn't a git repository, so creating a worktree fails no matter which base branch is used.
Repro on T3 Code Nightly 0.0.46-nightly.20261007.2761, macOS 26.4.1, with a Claude Code agent:
- From an agent thread, call
schedule_taskwithprojectIdset to the No project (scratch) project,bindToCurrentThread: false, and an interval schedule. - Call
run_scheduled_task_now.
The run's thread fails before the agent starts:
| 1 | Workspace preparation failed during provision worktree: Git command failed in GitWorkflowService.remoteExists (~/.t3/scratch): Failed to resolve the VCS driver for this Git command. |
run_scheduled_task_now and list_scheduled_tasks still report lastRunStatus: "succeeded", as this issue describes.
The cause is scheduledTaskWorkspaceStrategy in apps/server/src/mcp/OrchestratorMcpService.ts. It returns { type: "worktree", baseRef: "main", startFromOrigin: true } for every unbound task, whatever the project is.
Setting the task's Workspace to Project checkout in Settings → Scheduled tasks works around it. The next run got its own scratch folder and completed.
Resolving the workspace from the project would fix both cases. For a project that isn't a git repository, that means running in the project folder.