Cleanup orphaned worktrees
POST /api/v1/projects/{projectId}/{agentType}/worktrees/cleanup
POST
/api/v1/projects/{projectId}/{agentType}/worktrees/cleanup
Removes worktree directories that are not tracked by git, kills orphaned tmux sessions, and prunes stale git worktree metadata.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Project ID
Responses
Section titled “ Responses ”OK
object
removed
Removed is the list of orphaned worktree IDs that were cleaned up.
Array<string>
Bad Request
object
code
string
error
string
Not Found
object
code
string
error
string
Internal Server Error
object
code
string
error
string