diff --git a/pkg/agent/instance.go b/pkg/agent/instance.go index 358a38a19..f7aa5e256 100644 --- a/pkg/agent/instance.go +++ b/pkg/agent/instance.go @@ -208,7 +208,7 @@ func resolvePlanFallbacks(agentCfg *config.AgentConfig, defaults *config.AgentDe // ActivateWorktree creates a worktree for a session. // projectDir is the git repository to create the worktree in. // If empty, falls back to ai.Workspace. -// Path: /.picoclaw/worktrees// +// Worktree path: /.picoclaw/worktrees// func (ai *AgentInstance) ActivateWorktree(sessionKey, taskName, projectDir string) (*git.WorktreeInfo, error) { if projectDir == "" { projectDir = ai.Workspace @@ -220,7 +220,7 @@ func (ai *AgentInstance) ActivateWorktree(sessionKey, taskName, projectDir strin branchName := git.SanitizeBranchName(taskName) baseName := git.BranchBaseName(branchName) - wtPath := filepath.Join(repoRoot, ".picoclaw", "worktrees", baseName) + wtPath := filepath.Join(ai.Workspace, ".picoclaw", "worktrees", baseName) wt, err := git.CreateWorktree(repoRoot, wtPath, branchName) if err != nil {