When spawn() receives an explicit cwd (errands), the manager was still creating a standalone worktree at agent-workdirs/<alias>/ and injecting its path into the workspace layout prompt. The agent then edited files in the wrong directory — on a different branch than the errand's. Now when cwd is provided, we skip worktree creation entirely and use the caller's cwd for workspace layout, .cw/output/, and all paths.
47 KiB
47 KiB