Stitch / docs
Linear

General

Start repository work from Linear issues and comment commands.


Setup

In Integrations โ†’ Linear, enter a connection slug and add the signing secret from Linear's new webhook form and a personal API key with Read permission. Limit the key to the teams you need. Stitch verifies the API key's workspace and encrypts both credentials.

Copy the returned URL into Linear. Select Issues and Comments, select the team scope, and save the webhook. The connection shows when its first signed delivery arrives. The slug must be unique within your Stitch organization. Use lowercase letters, numbers, and hyphens, starting with a letter (up to 64 characters). Reference it as linear.connection in stitch-factory.yaml, then sync the repository. One connection and webhook can serve several workflows; each event is checked against every workflow that references the slug. The webhook URL uses the integration ID. Resource buttons show accessible teams, projects, workflow states, labels, and users with their IDs.

Replace credentials without changing the URL. Disconnecting blocks new and queued work; also disable the webhook in Linear.

Configure Linear MCP access separately

The Linear integration's API key does not give your agent access to Linear. To let the agent interact with Linear through MCP, add a Linear MCP server to your harness agent's configuration in the repository. Configure its authentication to read an environment variable such as LINEAR_API_KEY.

Store a Linear API key with the permissions the agent needs as a Stitch secret, then reference it in stitch-factory.yaml to inject it into the agent's environment. Do not commit the key to the repository.

execution:
  environmentVariables:
    - key: LINEAR_API_KEY
      source: managed
      secretName: LINEAR_API_KEY
      targets: [harness]

The environment variable name must match the one in your harness agent's MCP configuration.

Events and filters

Linear trigger JSON Schema ยท Factory schema

Supported subscriptions are Issue/create, Issue/update, and Comment/create. Declare create and update separately. Updates require changedFields or addedLabelIds; comments require commands, keywords, or mentionedUserIds. Valid unsupported webhook events are acknowledged without work.

Field under linearMeaning
connectionRequired connection slug from Integrations โ†’ Linear.
teamIds, projectIds, stateIds, assigneeIdsMatch any selected ID.
labelIds, labelOperatorMatch labels with has_any, has_all, or has_none.
addedLabelIdsIssue update added at least one selected label.
changedFieldsIssue update changed any of stateId, assigneeId, labelIds, projectId, priority, title, or description.
commandsComment's first token matches a selected slash command, case-sensitive.
humanActorsOnlyRequire a human user actor.
actorIdsRequire one of the selected actor IDs.
creatorIdsIssue creator IDs, not the event actor.
issueIdsIssue UUIDs; on comments, matches the parent issue rather than the comment ID.
issuesExact issue identifiers such as ENG-42.
projects, statesExact project or workflow-state names.
teamsExact team names or keys such as ENG.
labelsExact label names using labelOperator.
keywordsAny case-insensitive substring in issue title/description or the new comment body.
mentionedUserIdsUser IDs in Linear profile mention links in the issue description or comment body. Plain names do not count.

ID filters also accept assignee_ids, creator_ids, issue_ids, project_ids, state_ids, team_ids, and mentioned_user_ids. Use one spelling per setting. Aliases normalize to camelCase. Each list permits at most 50 unique non-empty values. Name and identifier matches are case-sensitive. ID and name filters are separate conditions: if both are set, both must pass.

All configured filters must pass. Issue filters use event-time webhook values and updatedFrom, including null previous values. Name/identifier/creator filters fetch missing issue details when needed. Comment issue filters fetch the parent's current state when processed. Keyword and mention filters use only the event's own text, not the parent issue's text for comments. Mentions use Markdown links such as [Name](https://linear.app/workspace/profiles/user-id). Required data must be available; a failed lookup never passes a filter. Temporary API failures are retried. A revoked key needs replacement.

See Issue events and Comment events for configuration examples.

Concurrency

Set top-level concurrency with scope: subject or scope: repository and an integer limit from 1 to 100. Subject means the issue UUID, including for comments on that issue. Limits are per trigger, Linear connection, and execution repository. Runs wait in the queue until capacity is available. Omit the setting for no trigger-specific limit.

Existing run reservations prevent duplicate admission and let retries resume failed launch publication. There is no separate Linear delivery receipt. Events that do not reserve a run can be evaluated again on retry; comment issue filters can then see newer state.

On this page