Summary
A Tasks dispatch preset with environmentKind: "project-default" (no machine) always spawns on the primary host. When the task's BB project has no local-path source on the primary host (its folder lives on another enrolled machine), dispatch fails with:
HTTP 404: Project has no local-path source for host
So a single preset like "Opus · high" cannot serve projects that live on different machines. The only workaround is one preset per machine (environmentKind: "new-worktree" + machineId), which multiplies the preset list by the number of machines.
Where
plugins/tasks — presetSpawnEnvironment returns { type: "project-default" } for project-default presets.
- server —
resolveProjectDefaultThreadEnvironment always uses requireConnectedPrimaryHostId(deps) and then resolveProjectWorkspaceTarget({ hostId, projectId }), which 404s when the project has no source on that host.
Seen on 0.44.0 and 0.44.1-nightly.36327831681.1.
Repro
- Two enrolled machines: the primary host A and machine B.
- BB project P with a single local-path source on B (
isDefault: true), git repo.
- Tracker project linked to P, any task, preset with environment
project-default.
bb tasks dispatch <task> --preset <preset> → HTTP 404: Project has no local-path source for host.
Expected
project-default should resolve to the host of the project's default source (or any source) when the primary host has none — the same way a new thread in that project would start on the machine where the project lives. Projects with a source on the primary host keep today's behavior.
Local workaround
We patched the bundled tasks plugin: when the project has no source on the primary host, spawn with { type: "host", hostId: <default source host>, workspace: { type: "managed-worktree", baseBranch: { kind: "default" } } }, falling back to { type: "unmanaged", path: <source path> } if the worktree cannot be created. Fixing it in resolveProjectDefaultThreadEnvironment would cover every caller, not only Tasks.
Summary
A Tasks dispatch preset with
environmentKind: "project-default"(no machine) always spawns on the primary host. When the task's BB project has no local-path source on the primary host (its folder lives on another enrolled machine), dispatch fails with:So a single preset like "Opus · high" cannot serve projects that live on different machines. The only workaround is one preset per machine (
environmentKind: "new-worktree"+machineId), which multiplies the preset list by the number of machines.Where
plugins/tasks—presetSpawnEnvironmentreturns{ type: "project-default" }for project-default presets.resolveProjectDefaultThreadEnvironmentalways usesrequireConnectedPrimaryHostId(deps)and thenresolveProjectWorkspaceTarget({ hostId, projectId }), which 404s when the project has no source on that host.Seen on 0.44.0 and 0.44.1-nightly.36327831681.1.
Repro
isDefault: true), git repo.project-default.bb tasks dispatch <task> --preset <preset>→HTTP 404: Project has no local-path source for host.Expected
project-defaultshould resolve to the host of the project's default source (or any source) when the primary host has none — the same way a new thread in that project would start on the machine where the project lives. Projects with a source on the primary host keep today's behavior.Local workaround
We patched the bundled tasks plugin: when the project has no source on the primary host, spawn with
{ type: "host", hostId: <default source host>, workspace: { type: "managed-worktree", baseBranch: { kind: "default" } } }, falling back to{ type: "unmanaged", path: <source path> }if the worktree cannot be created. Fixing it inresolveProjectDefaultThreadEnvironmentwould cover every caller, not only Tasks.