Auto-diagnose new Linear bug reports with Perplexity research

By General Input

When a bug is filed in Linear, an agent researches the error online and posts a first-pass diagnostic comment so engineers walk in with a head start.

Integrations

  • Linear
  • Perplexity AI

Type

Agentic Task

Categories

  • Engineering
  • Customer Support

Build an agent workflow that auto-triages new Linear bug reports by doing a first-pass web investigation and posting a diagnostic comment, so the assigned engineer walks in with context instead of a blank issue.

Trigger: a Linear webhook on issue creation, filtered to issues that carry the 'bug' label (the label name should be configurable). Linear supports outbound webhooks for issue.create events, so use that rather than polling.

What the agent should do on each trigger:

1. Read the new Linear issue (title, description, labels, attachments) using Linear's Get Issue operation. Extract whatever the reporter actually included: the error message or exception class, the stack trace, the reproduction steps, the affected version or environment, and any vendor or library names. If the issue body has no concrete error string and no reproduction steps, stop here and do not comment. Vague reports get skipped rather than hallucinated answers.

2. Call Perplexity AI's Create Chat Completion operation with the sonar-reasoning-pro model. Reasoning is important here because the agent needs to correlate symptoms across multiple sources, so don't downgrade the model. In the prompt to Perplexity, paste the extracted error details and ask for matching GitHub issues, Stack Overflow threads, vendor changelogs and release notes, and CVE or security advisories that describe the same symptoms. Use Perplexity's domain filter feature to bias the search toward github.com, stackoverflow.com, and the documentation domains of any libraries or vendors named in the bug. Ask Perplexity to return citations.

3. From Perplexity's response, assemble a short diagnostic with three parts: two or three candidate root causes ranked by how well the symptoms match, links to anyone who has reported the same symptoms (with one-line summaries of what they hit), and any documented workarounds or fixes. Keep it tight: this is a head start, not a final verdict. Always include inline citation links from Perplexity's search_results so the engineer can verify.

4. Post the diagnostic back on the original Linear issue using Linear's Add Comment to Issue operation. Tag the triage owner at the top of the comment (the triage owner should be a configurable Linear user; resolve their user id with List Users if needed). Format the comment in Markdown with a clear 'Auto-triage diagnostic' header so it's obviously machine-written and engineers know what to expect.

Guardrails: never modify the original issue body, labels, assignee, or status — comments only. Never invent a root cause that isn't supported by a cited source. If Perplexity returns nothing useful, post a short 'no matching prior reports found' comment instead of fabricating leads. Keep the whole comment under roughly 400 words so it stays scannable in Linear.

Configuration the workflow should expose to the user: the Linear label that triggers triage (default 'bug'), the Linear user to tag as triage owner, and an optional list of trusted documentation domains to bias the Perplexity search toward.

Related prompts

Explore more prompts
Catch feature flags that never got switched on in productionWeekly alert noise review board for incident.io on-callMorning triage board for your Kernel browser agent runsTrack every half finished LaunchDarkly rollout in one boardFind the customers stuck contacting support again and againTurn shipped Linear work into Intercom product announcementsVoice agent QA review board for your Hume EVI callsClose the loop between Front tickets and Linear bug fixesOpen a Heroku release war room the moment production looks wrongFind the themes Help Scout tags miss and file them in Linear