> ## Documentation Index
> Fetch the complete documentation index at: https://ai-development-environment.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# worktreeMergeCandidates

> Load linked requests and their merge options for the current page scope.



**query** `worktreeMergeCandidates(appId: ID, agentId: ID): [WorktreeMergeCandidate!]!`

## Arguments

**`appId`**: `ID`

Limit candidates to repositories attached to this app.

---

**`agentId`**: `ID`

Limit candidates to checkouts on the focused agent.

## Returns

`[WorktreeMergeCandidate!]!`

**`worktreeId`**: `ID!`

Identifier of the linked checkout.

---

**`repositoryName`**: `String!`

Display name of the checkout repository.

---

**`agentName`**: `String!`

Display name of the agent that owns the checkout.

---

**`branch`**: `String!`

The checkout's current source branch.

---

**`folder`**: `String!`

Local checkout path.

---

**`provider`**: `WorktreeMergeProvider!`

Provider for the linked request.

---

**`requestKey`**: `String!`

Opaque provider request key used to prevent duplicate selection.

---

**`requestNumber`**: `Int!`

Provider-scoped pull or merge request number.

---

**`requestTitle`**: `String!`

Title of the linked request.

---

**`requestUrl`**: `String!`

Provider URL for the linked request.

---

**`repositoryNameWithOwner`**: `String`

The GitHub target repository in owner/name form.

---

**`projectId`**: `ID`

The GitLab target project identifier.

---

**`reviewedHeadSha`**: `String`

Provider source commit shown by the current merge options.

---

**`reviewedTargetBranch`**: `String`

Provider target branch shown by the current merge options.

---

**`blockedReason`**: `String`

Why the candidate cannot be selected, when applicable.

---

**`githubOptions`**: `GitHubPullRequestMergeOptions`

Immediate GitHub merge options, when available.

---

**`gitlabOptions`**: `GitLabMergeOptions`

Immediate GitLab merge options, when available.



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.