Get worktree
GET /api/v1/projects/{projectId}/{agentType}/worktrees/{wid}
Returns a single worktree with terminal connection state, Claude attention status, and git branch information.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project ID
Agent type
Worktree ID
Responses
Section titled “ Responses ”OK
object
Branch is the git branch checked out in this worktree.
ExitCode is the agent’s exit code when in shell state. Nil means the agent is still running (or no exit code captured).
ID is the worktree identifier — directory name for git worktrees, “main” for project root.
NeedsInput is true when Claude is blocked waiting for user attention.
NotificationType indicates why Claude needs attention.
Path is the filesystem path inside the container.
ProjectID is the container ID this worktree belongs to.
State is the terminal connection state (connected, shell, background, stopped).
Bad Request
object
Not Found
object
Internal Server Error