# Comment

URL: https://docs.usestitch.ai/docs/triggers/linear/comment



Use `type: Comment` with `actions: [create]`.
Comment edits and deletions do not start work.

## Schema [#schema]

[Linear trigger JSON Schema](/schema/linear.json)

```yaml
key: linear-command
name: Handle Linear commands
provider: linear
harness: coding-agent
sandbox: workspace
agentId: build
initialPrompt: Investigate the request in the comment.
linear:
  connection: engineering
  event:
    type: Comment
    actions: [create]
  commands: [/stitch]
  humanActorsOnly: true
  teamIds: ['backend-team-uuid']
```

## Filters [#filters]

These fields belong under `linear`. All configured filters must pass.

| Filter                                                         | Matching                                                                                         |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [`commands`](/docs/triggers/linear#events-and-filters)         | Comment's first token matches a selected slash command, case-sensitive.                          |
| [`teamIds`](/docs/triggers/linear#events-and-filters)          | Match any selected team ID on the parent issue.                                                  |
| [`projectIds`](/docs/triggers/linear#events-and-filters)       | Match any selected project ID on the parent issue.                                               |
| [`stateIds`](/docs/triggers/linear#events-and-filters)         | Match any selected workflow state ID on the parent issue.                                        |
| [`assigneeIds`](/docs/triggers/linear#events-and-filters)      | Match any selected assignee ID on the parent issue.                                              |
| [`creatorIds`](/docs/triggers/linear#events-and-filters)       | Match the parent issue's creator ID, not the comment author or event actor.                      |
| [`issueIds`](/docs/triggers/linear#events-and-filters)         | Match the parent issue UUID, not the comment ID.                                                 |
| [`issues`](/docs/triggers/linear#events-and-filters)           | Match exact parent issue identifiers such as `ENG-42`.                                           |
| [`projects`](/docs/triggers/linear#events-and-filters)         | Match any selected exact project name on the parent issue.                                       |
| [`states`](/docs/triggers/linear#events-and-filters)           | Match any selected exact workflow-state name on the parent issue.                                |
| [`teams`](/docs/triggers/linear#events-and-filters)            | Match any selected exact team name or key on the parent issue.                                   |
| [`labelIds`](/docs/triggers/linear#events-and-filters)         | Match the parent issue's selected labels using `labelOperator`.                                  |
| [`labels`](/docs/triggers/linear#events-and-filters)           | Match exact parent issue label names using `labelOperator`.                                      |
| [`labelOperator`](/docs/triggers/linear#events-and-filters)    | `has_any` (default), `has_all`, or `has_none`.                                                   |
| [`humanActorsOnly`](/docs/triggers/linear#events-and-filters)  | Require a human user actor; defaults to `false`.                                                 |
| [`actorIds`](/docs/triggers/linear#events-and-filters)         | Require one of the selected actor IDs.                                                           |
| [`keywords`](/docs/triggers/linear#events-and-filters)         | Match any case-insensitive substring in this comment's body, not the parent issue's text.        |
| [`mentionedUserIds`](/docs/triggers/linear#events-and-filters) | Match user IDs in Linear profile mention links in this comment's body; plain names do not count. |

See [shared filter rules and aliases](/docs/triggers/linear#events-and-filters)
for snake_case spellings and how ID and name filters combine.

<Callout type="warning">
  Set at least one of `commands`, `keywords`, or `mentionedUserIds` (`mentioned_user_ids`).
  `changedFields` and `addedLabelIds` are not supported for comment events.
</Callout>

When `commands` is set, the first non-whitespace token must match a configured command exactly and
case-sensitively. `/stitch-other` does not match `/stitch`.

## Event behavior [#event-behavior]

Command, keyword, mention, actor, and issue UUID checks use the webhook.
Team, project, status, assignee, creator, issue identifier, and label filters
fetch the parent issue's current API state at processing time.
A failed required lookup does not pass. Once a run is reserved, retries reuse that run
without fetching the issue again. Before reservation, retries can see newer issue state.

## Concurrency [#concurrency]

Supported scopes: `repository` and `subject`. The subject is the parent issue,
not the comment. Limits are per trigger, Linear connection, and execution repository.
Concurrency limits hold work in the queue until capacity is available.
`commit` and `event` scopes are not supported.

See [General](/docs/triggers/linear) for setup and shared rules, and the
[Linear trigger schema](/schema/linear.json) for configuration fields.
