Update workspace model ownership flows

This commit is contained in:
Mohamed Boudra
2026-06-15 22:02:18 +07:00
parent af0437e6df
commit a4d4d42873
23 changed files with 1100 additions and 154 deletions
+9 -5
View File
@@ -436,14 +436,18 @@ async function resolveRunWorkspace(
return { id: explicit, cwd };
}
// TODO: thread the run `prompt` as firstAgentContext so workspace-level
// title/branch generation picks up the task description (U8/U6 deferred).
const result = options.worktree
? await client.createWorkspace({
backing: "worktree",
cwd,
branch: options.worktree,
baseBranch: options.base,
source: {
kind: "worktree",
cwd,
worktreeSlug: options.worktree,
baseBranch: options.base,
},
})
: await client.createWorkspace({ backing: "local", cwd });
: await client.createWorkspace({ source: { kind: "directory", path: cwd } });
if (!result.workspace) {
throw {