> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.golf/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Linear

> Connect your Linear workspace, choose the teams and the work to import, and disconnect it or delete its data.

Connect your Linear workspace to your Agent Golf organization so that Agent Golf can show the spend of your initiatives, projects, and issues. You connect once for the organization, and each workspace of the organization sees the imported teams.

## Before you begin

* **Manage Organization Integrations** in Agent Golf. The organization Administrator role has it. See [Organization roles](https://docs.agent.golf/account/users.md#organization-roles).
* A Linear workspace admin, who must approve the install of the Agent Golf app.
* The GitHub integration of Linear, so that Linear attaches your pull requests to issues. See [Pull-Request Links](https://docs.agent.golf/linear/pull-request-links.md).
* A [connected GitHub organization](https://docs.agent.golf/github/organization.md). Agent Golf counts only the pull requests that it receives from GitHub.

## Connect your Linear workspace

1. Open **Settings**, choose **Organization** at the top of the navigation, then select **Integrations > Linear**.
2. Read **Access That Agent Golf Asks For**, then select **Connect Linear**. Linear opens.
3. In Linear, choose the teams that the app can read, and approve the install. Linear returns you to Agent Golf, and the page shows "Connecting Linear…".
4. **Choose What to Import** opens. Continue with [Choose the import](#choose-the-import).

Finish the install in the same browser tab within 10 minutes. Otherwise, Agent Golf shows **Linear Is Not Connected**, and you must connect again. See [Connect errors](https://docs.agent.golf/linear/troubleshooting.md#connect-errors).

### The access that Agent Golf asks for

Agent Golf installs in Linear as an app, so its reads do not show as actions of the person who installed it. The app asks for two read-only scopes:

* `read`: read the items of your Linear workspace.
* `initiative:read`: read initiatives. An app needs this scope in addition to `read` to see initiatives.

The app can read only the teams that the Linear admin gives it. A Linear admin can change these teams later in Linear. See [Change the teams of the app](#change-the-teams-of-the-app). For the data that Agent Golf keeps, see [What Agent Golf Imports](https://docs.agent.golf/linear/imports.md#what-agent-golf-keeps).

## Choose the import

Agent Golf imports nothing from a new connection until you choose the teams and the work. In **Choose What to Import**:

1. Under **1. Teams**, choose **All Teams** or **Specific Teams**. For **Specific Teams**, select the teams. Select **Next**.
2. Under **2. Work**, choose **Active Work** or **All Work, with History**.
3. Select **Start Import**.

Agent Golf saves the teams and the work together, then starts the [first import](https://docs.agent.golf/linear/imports.md#the-first-import). For what each choice imports, see [Choose what to import](https://docs.agent.golf/linear/imports.md#choose-what-to-import).

If the dialog shows **Linear gave Agent Golf no team**, the Linear app can read no team. See [The import waits for its choice](https://docs.agent.golf/linear/troubleshooting.md#the-import-waits-for-its-choice).

To choose later, select **Not Now**. The Linear page then shows "Agent Golf imports nothing from Linear until you choose what to import." and **Choose Import**. The dialog opens again at each visit until you choose.

## The connection card

After you connect, the Linear page shows the connection with its state and these facts:

| Fact | Value |
| - | - |
| **Linear Workspace** | The Linear workspace name and its address, for example `linear.app/acme`. |
| **Connection** | Who connected Linear, and when. |
| **Sync** | The import progress, or the time of the last sync and of the last event from Linear. |
| **Imported** | The number of initiatives, projects, and issues. |
| **Import** | Your work choice. Change it here. |
| **Workspace Access** | A reminder that each workspace sees every imported team. |

| State | Meaning |
| - | - |
| **Active** | Agent Golf keeps the Linear data current. |
| **Needs Reconnect** | Linear no longer accepts Agent Golf's access, and the sync stopped. Select **Reconnect**. |
| **Disconnected** | An admin disconnected Linear. The sync stopped, and Agent Golf keeps the data. Select **Reconnect**. |
| **Deleting Data** | An admin deleted the imported data. No workspace sees it. The connection leaves the page when the deletion ends. |

## Teams

The **Teams** card below the connection card chooses the Linear teams that Agent Golf imports. Each workspace of the organization sees every imported team's data, including a workspace that you create later.

* Choose **All Teams** to import every team that the Linear app can read, including teams that Linear adds later.
* Choose **Specific Teams**, and select the teams in the **Import** column. A new team waits until you select it.

A change saves at once, and Agent Golf imports again with the new teams. Each row shows the team name, its key, a lock for a private team, and its status:

| Status | Meaning |
| - | - |
| **Shown** | Agent Golf imports the team, and each workspace sees it. |
| **Not Imported, Data Kept** | With **Specific Teams**, the team is not selected. Agent Golf stops its updates and hides it from every workspace. Its data stays. |
| **No Access in Linear** | The Linear app can no longer read the team: a Linear admin removed it from the team access of the app, or the team is private or deleted in Linear. Its data stays, hidden. If the team still exists, see [Change the teams of the app](#change-the-teams-of-the-app). |

For which items a team brings, see [Teams](https://docs.agent.golf/linear/imports.md#teams).

### Change the teams of the app

A Linear admin changes the teams that the app can read in Linear. **Reconnect** does not change them: Linear does not ask for the teams again while the app stays installed.

1. In Linear, open **Settings > Applications**, then **Agent Golf**.
2. Under **Team access**, choose **All public teams and select other teams…** or **Only select teams…**. Select the teams, then select **Update**. The app reads a private team only when the admin selects it.
3. In Agent Golf, on the Linear page, select **Refresh Teams** if the new teams do not show yet.

With **All Teams**, Agent Golf imports a new team at once, and each workspace of the organization sees it. With **Specific Teams**, a new team waits until you select it.

## In a workspace

A workspace cannot connect, disconnect, or change Linear. In a workspace, **Settings > Integrations > Linear** shows each Linear connection of the organization, read only, with its imported teams. Users with **Manage Organization Integrations** also see **Manage in Organization Settings**.

## One Linear workspace, one organization

A Linear workspace connects to one Agent Golf organization at a time. To connect it to another organization, an admin of the first organization must disconnect it first.

## Disconnect

1. On the Linear page, select **Disconnect**.
2. Confirm in **Disconnect Linear**.

Agent Golf stops the sync and gives back its access to Linear. It keeps the imported data, the follow lists, the import choice, and the teams. The Linear page and the roadmap show the data from the date of the disconnect.

To remove the app from Linear too, uninstall it in your Linear workspace settings.

## Reconnect

Select **Reconnect** on the Linear page. The **Reconnect Linear** dialog shows how to change the teams of the app. Select **Continue to Linear**, and approve the install in Linear again. Agent Golf uses the same connection, so the imported data, the follow lists, the import choice, and the teams stay. Agent Golf then reads the changes that it missed.

When the state is **Needs Reconnect**, reconnect in the same way. See [Linear access stopped](https://docs.agent.golf/linear/troubleshooting.md#linear-access-stopped).

## Delete the data

You can delete the imported data of a disconnected Linear workspace. You need **Manage Organization Integrations**.

1. [Disconnect](#disconnect) Linear.
2. On the Linear page, select **Delete Imported Data**.
3. Read the dialog. It names the Linear workspace and counts the initiatives, projects, issues, and pull request links that are not archived.
4. Type the Linear workspace name, and select **Delete Imported Data**.

Agent Golf deletes the connection, its access tokens, the teams, the imported items with the archived items, their pull-request links, and the follow lists that name the items. No workspace sees the data from that time, and the Roadmap, the Dashboard, the Team page, and the user pages show the same views as before a first connect. You cannot undo the deletion.

Until the deletion ends, the organization Linear page shows the connection as **Deleting Data**, and a workspace no longer shows it. Agent Golf deletes the connection and the tokens after Linear confirms that it revoked the access. If Linear does not confirm within 24 hours, Agent Golf deletes the imported items. It keeps the connection, the tokens, and the teams until Linear confirms.

To see Linear data again, connect Linear again. Agent Golf then imports the data again.

### Other deletions

* **Deletion of the organization** deletes the same data as **Delete Imported Data**.
* **Deletion of a workspace** deletes only the follow lists of that workspace.
* **Delete Usage Data**, **Delete Organization Data**, and the deletion after a plan ends do not delete the Linear data. See [Data Retention & Deletion](https://docs.agent.golf/account/data-retention.md).

The Linear change events stay until their time ends, even after a deletion. See [Change events](https://docs.agent.golf/linear/imports.md#change-events). For how long backups keep deleted data, see [Delete data in the cloud](https://docs.agent.golf/account/data-retention.md#delete-data-in-the-cloud).


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