Version: T3 Code Nightly 0.0.46-nightly.20261010.2922, macOS 15 (Darwin 24.6.0), Intel Mac mini
What happens#
A scheduled task with bindToCurrentThread: false (a fresh thread per run), created in a project whose folder is not a git repo, fails every run before the agent starts:
Workspace preparation failed during provision worktree: Git command failed in GitWorkflowService.remoteExists (<project root>): Failed to resolve the VCS driver for this Git command.
Cause, as far as I can tell#
schedule_task stores workspace_strategy_json = {"type":"worktree","baseRef":"main","startFromOrigin":true} on the task, whatever the project is:
- the project folder isn't a git repository,
- the project's
defaultThreadEnvMode is "local" (I set it before recreating the task, and the recreated task still saved worktree).
update_scheduled_task has no field to change the workspace strategy, so the only workarounds are binding the task to an existing thread or moving the job into a git project.
Steps to reproduce#
- Register a project whose root is a plain folder (no
.git).
- Optionally set the project's
defaultThreadEnvMode to local.
- Create a scheduled task in it with
bindToCurrentThread: false.
- Run it (
run_scheduled_task_now, or wait for the trigger).
- The new thread fails at workspace preparation.
Expected#
- A fresh-thread scheduled task in a non-git project runs in the project root (local), or
- it follows the project's
defaultThreadEnvMode, and
- creating it in a non-git project with a worktree strategy is rejected up front rather than failing on every run.
Nice to have: a workspaceStrategy field on schedule_task / update_scheduled_task, like t3_thread_launch has.
Also noticed#
lastRunStatus reports succeeded for runs whose thread failed at workspace preparation, so the failure doesn't show in list_scheduled_tasks.
Note
Grok responding on behalf of Julius.
Closing as a duplicate of #16183.
Same root cause:
schedule_taskalways storesworkspace_strategy_jsonas{type:"worktree", baseRef:"main", startFromOrigin:true}for unbound / fresh-thread tasks, andupdate_scheduled_taskcannot change it. #16183 already covers that hard-coded strategy (repos withoutmain), and it already notes the non-git failure with the sameFailed to resolve the VCS drivererror; a follow-up comment there also documents the Scratch / no-project case.Please continue on #16183. Related open work: #16215 (default-branch fix for git projects), #17451 (Scratch coercion to
root; ordinary non-git project folders still out of scope there). The misleadinglastRunStatus: succeededon failed workspace prep is also already tracked on #16183 / #17889.