Skip to main content
{ Task Management }

Linear Ticket Creation

Turns the structured findings another agent produces into Linear issues, one per finding, and keeps them in sync on every run without duplicates.

What this agent does

This agent files Linear issues from the findings another agent writes, such as a triage, posture, or SRE agent that runs before it in the same workflow. It creates an issue for each new finding and adds to the existing issue for a finding it has seen before. It closes an issue when the finding is resolved, and reopens an issue it closed if the finding returns. It never overrides an issue a person closed or canceled.

The challenge

An agent that finds problems is only useful if the right people see them in the tool they already work in. Filing issues by hand from a report is slow. A scheduled agent that does not check for existing issues creates a duplicate on every run. Nobody closes the issues for fixed problems, and the agent reopens issues a person closed on purpose.

The solution

The agent gives every finding a stable key and looks up existing issues by their labels before it writes anything. It reads each matching issue and its comments before it adds anything, so it never repeats itself or overrides a person's decision. Provides one accurate issue per finding, updated as the findings change.

Workflow

  1. 01

    Read the findings

    Read the structured findings the earlier agent wrote, and stop if they are missing or malformed.

  2. 02

    Match existing issues

    Look up issues for these findings by their labels, including completed and canceled ones, and read each match.

  3. 03

    Decide each issue

    Create, comment, close, reopen, or leave alone, depending on the finding, the issue's state, and its comment history.

  4. 04

    File and log

    Make the changes in Linear and record every action and failure.

Agent template

# Linear Ticket Creation

## Measurable outcomes

Every open finding from the earlier agent has exactly one Linear issue, and every resolved finding's issue is closed. No issue a person closed or canceled is reopened. Track how many issues were created, updated, closed, and reopened on each run.

## Procedure

Run after the agent whose findings I want filed, and read its structured output. Stop with an error when that output is missing or malformed, because an empty run would look the same as a clean one. Each finding needs a stable key, a title, a description, a severity, and whether it is open or resolved. Label every issue with a shared label for this workflow and a label for the finding's source, such as the service or repository, so the next run can find it. Before writing, look up issues with those labels, including completed and canceled ones, and read the description and comments of each likely match. Create an issue for each open finding that has none, with sections for context, evidence, and acceptance criteria. Comment on an open issue only when the finding changed, and add nothing when the thread already says it. Close an issue when its finding is resolved, with a comment that says why, and mark it as closed by this agent. Reopen an issue only when this agent closed it and the finding is open again. When a person completed or canceled the issue, leave it closed and add at most one comment that names their decision and what changed. When a matching issue was deleted, create a new one that mentions the old identifier. Let me set the team, project, cycle, labels, and assignee. Stop and report when more than a quarter of the writes fail, since that usually means a permissions problem rather than a one-off error. Start in a report-only mode that prints every change it would make before it writes anything.

## Requirements

It needs Linear access to read and write issues, comments, and labels in the target team, and read access to the earlier agent's output, and nothing more. It never deletes issues and never changes issues outside its own labels.