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

# Linear and Subtext: Triage from the Real Session

> Have Linear's agent triage incoming issues automatically — opening the Subtext session, diagnosing the UX flow, and posting a comment backed by real session evidence.

Linear tells you an issue arrived. It can't tell you what actually happened to the person who filed it. Subtext can. When an issue enters triage carrying a Fullstory or Subtext session URL, a Linear agent automation opens the session with the Subtext MCP, inspects the UX flow, and posts a triage comment backed by real session evidence — not a paraphrase of the issue text. Linear routes the work; Subtext diagnoses it.

## What you need

* A Linear **Business or Enterprise** plan — Linear's agent automations are available on those plans and draw from your workspace's AI credits
* A team with **Triage** enabled
* A workspace admin to allow the Subtext MCP server
* The hosted **Subtext MCP** endpoint (below)

<Note>
  Subtext's MCP server is hosted, so there is nothing to run yourself: paste `https://api.fullstory.com/mcp/subtext` into Linear's **Custom URL…** field and complete the OAuth flow — see [Manual install](/install/manual) for details. If you haven't set up Subtext capture yet, start with [Install the capture snippet](/install/overview).
</Note>

<Note>
  Linear is consolidating its agent automations under [Loops](https://linear.app/docs/loops). In-product, the triage surface currently appears under team settings as **Agent Loops**, with a panel headed **Agent automations** — this recipe follows that flow. If your workspace shows a team **Loops** tab instead, create a loop triggered on issues entering this team's triage queue; the trigger, tools, and prompt below carry over unchanged. Linear's built-in [Triage Intelligence](https://linear.app/docs/triage-intelligence) (property suggestions and duplicate detection) is a separate feature and isn't required for this recipe.
</Note>

## Set it up

<Steps>
  <Step title="Enable Triage for the team">
    1. Go to **Team settings → Triage**.
    2. Turn **Triage** on if it isn't already.
  </Step>

  <Step title="Create the agent automation">
    1. In **Team settings → Triage**, open **Agent Loops**.
    2. Under **Agent automations** ("Define how the Linear agent automatically responds to new issues entering triage for this team"), click **Add automation**.
    3. Confirm the trigger: **When any issue enters triage**.
  </Step>

  <Step title="Add the Subtext MCP as a tool">
    1. On the automation's **Tools** row, click **+ Add tool**.
    2. Pick **subtext** if it's already connected in your workspace. Otherwise choose **+ Custom URL…**, paste your Subtext MCP endpoint into the **Add custom MCP server** dialog, and complete the OAuth flow.
    3. Available servers are managed by workspace admins under **Workspace settings → Security** — if the server can't be added, an admin needs to allow it there first.

    <Note>
      Connecting the server under **Settings → Agent personalization** makes it available to the Linear agent in your own interactive sessions, but automations declare their tools explicitly on the **Tools** row — an unattended run doesn't inherit your personal connections.
    </Note>
  </Step>

  <Step title="Add the automation prompt">
    Paste this as the automation's instructions:

    ```text theme={null}
    When an issue enters triage, check the description and comments for a Fullstory or Subtext session URL.

    If a session URL is present, use the Subtext tools to inspect the session before taking action.

    Analyze the session and summarize:
    - what the user was trying to do
    - what actually happened
    - likely UX or product root cause
    - concrete evidence from the session, such as UI state changes, errors, or network outcomes
    - reproduction clues
    - whether the action appeared to succeed or fail
    - recommended next triage action

    Post the result as a comment on the issue.

    If no session can be opened, say so explicitly.
    If no session URL is present, do nothing.
    ```

    <Tip>
      Resist pasting a Subtext tool catalog into the instructions — the MCP tools are self-describing, and a hardcoded tool list goes stale as the catalog evolves. The instructions above name the behavior, not the tools.
    </Tip>
  </Step>

  <Step title="Set a comment format">
    Ask the automation to post comments in a consistent structure by appending this to its instructions:

    ```text theme={null}
    Session triage summary

    - User goal: …
    - Observed behavior: …
    - Likely root cause: …
    - Evidence from session: …
    - Reproduction clues: …
    - Outcome: success / failure / unclear
    - Recommended next step: …
    ```
  </Step>

  <Step title="Keep interactive sessions consistent (optional)">
    The automation's instructions are what govern its unattended runs. To make the Linear agent behave the same way when you work with it directly — in chat or on a mention — add matching guidance under **Settings → Agent personalization**:

    ```text theme={null}
    Always use the Subtext tools when a Fullstory or Subtext session URL is present on an issue. Prefer evidence from the session over speculation. Include concrete UI observations and network outcomes when available.
    ```
  </Step>

  <Step title="Test it">
    1. Create a new issue in the team's triage queue.
    2. Put a real Fullstory or Subtext session URL in the description.
    3. Wait for the automation to run, then open its **Run history** (toggle **Show successful runs** if the list looks empty).

    You've wired it correctly when the run history shows Subtext tool calls such as `review-open` and `review-summary`. Those calls confirm the automation is inspecting the session itself, not just summarizing the issue text.
  </Step>
</Steps>

<Tip>
  A triage comment grounded in the session gives the next engineer the diagnosis before they open the issue.
</Tip>

## Related

* [Session Review overview](/session-review/overview) — what your agent does once a session is open.
* [Install the capture snippet](/install/overview) — required before any session URL exists to attach.
