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

# Linear

> Assign tasks to Replicas directly from Linear.

Replicas integrates with Linear as an assignable agent. Assign issues to Replicas like you would a team member, and it spawns a workspace to complete the task.

## Setup

1. Go to [Organization → Integrations](https://app.replicas.dev/dashboard/integrations)
2. Find **Linear** and click **Install**
3. Authorize Replicas for your Linear workspace

Ensure you have at least one [coding agent configured](/admin/credentials) before assigning tasks.

## Personal Account Connection

Connect your Linear account from [Personal → Connections](https://app.replicas.dev/dashboard/account/connections) to link your Linear user ID to your Replicas account. Replicas then uses your personal defaults and credentials even when your Linear email differs from your Replicas email. Email matching remains a fallback for members who have not connected an account.

This identity connection is separate from the [organization integration](#setup) used by agents to create and update issues. A disconnected personal account does not mean organization access has been lost.

## Creating Issues from a Workspace

Ask your workspace agent to create a Linear ticket. All new workspaces keep organization credentials on the server and refresh them through the gateway; a separate Linear MCP server is not required. Use `replicas.linear.graphql()` for API calls and `replicas.linear.download(url)` for protected attachments.

If an agent reports a rejected workspace token, ask it to retry through the gateway. Reconnect under [Organization → Integrations](https://app.replicas.dev/dashboard/integrations) only if the gateway reports missing credentials or an unrecoverable authentication failure.

Workspaces created before the gateway retain compatibility with their existing tokens, including token refresh. Agents should use the SDK when available. Customer-defined tokens remain separate from the organization integration.

## How It Works

When you assign an issue to Replicas or mention it in a comment:

1. **Replicas Agent** (an AI orchestrator) analyzes the issue
2. If clarification is needed, it asks follow-up questions in a thread
3. Once ready, it spawns a workspace with your chosen coding agent
4. The agent works autonomously, streaming progress to the thread
5. As work progresses, session links (workspace and PRs) appear in the Agent Session panel
6. The agent's final response completes the Linear session

When work starts or resumes, Replicas also becomes the issue's delegate if no agent is already delegated. The human assignee keeps ownership.

If workspace provisioning or an agent turn fails, the Agent Session shows the concrete error when available and marks the issue as blocked. Readiness or initial-message delivery failures remain non-terminal so a later prompt can retry the active workspace.

### Agent Selection

Replicas uses the triggering user's [agent defaults](/admin/defaults) when their Linear account is connected or its email matches a Replicas user. Admins can also open Linear **Configure** under Integrations to set Linear-specific defaults before falling back to the organization defaults.

Follow-up comments wake sleeping workspaces and keep using the workspace's selected coding agent and model. Follow-up comments also restore archived workspaces.

### Environment Selection

If your organization has multiple [environments](/features/environments), Replicas auto-picks one from the issue context (repo names, file paths, issue title) when confident, and prompts in the agent session otherwise. The env's binding determines what gets cloned. With a single env, a personal default, or an org default, the prompt is skipped. When the Linear user matches a Replicas user, their personal default takes precedence over the organization default.

### Context

The context provided to the agent are listed below:

* Issue title
* Issue description (including images)
* Parent issue content
* Previous comments on the issue
* User message (if triggering using @Replicas in a comment), which scopes what the agent implements; start it with `/plan` for a planning-only session

### Issue State Automation

Replicas keeps the Linear issue state in sync with what the agent is doing:

* **In Progress** when a workspace is created or the agent re-engages on a new comment.
* **In Review** when the agent's turn completes with a PR open.
* **Blocked** when waiting on human input (env picker), a workspace fails, or a security policy denies the request.

For teams with renamed workflow states (e.g. "Code Review" instead of "In Review"), click **Configure** on Linear under [Organization → Integrations](https://app.replicas.dev/dashboard/integrations) to map each Replicas concept to a specific state per team. Unmapped slots fall back to a name-match heuristic; if nothing matches (typically for Blocked), the issue is left alone.

### Closing the workspace

When you mark an issue as Done, Canceled, or Duplicate in Linear, Replicas automatically archives the associated workspace. Archived workspaces keep their conversation history and can be explicitly restored.

## Intended Usage

Replicas works best with concise but direct instructions. Agents can typically crawl and search codebases well, so it is best to only provide a handful of sentences.
Describe:

* Where to look
* Functionality
* Any considerations

Code changes produce a pull request by default. Explicit instructions such as "don't open a PR" take precedence. Questions, investigations, reviews, and planning-only requests do not require code changes or a PR.

Start a comment with `/plan` to request a planning-only response with a plan link. See [Plan Mode](/features/workspaces/plan-mode).

## Related resource

For evaluation guidance, see [Linear issue to PR](https://replicas.dev/resources/linear-issue-to-pr).
