---
title: "Teaching an agent to auto-fix bugs"
description: "Linear routes Datadog-detected problems into triage, where an automation assigns them to the Linear Agent to run a dedicated skill and attempt a fix."
url: "https://swe.quest/articles/teaching-an-agent-to-auto-fix-bugs-5800199ad541eaec"
canonical: "https://linear.app/now/linear-agent-bug-fix"
source: "Linear"
published: "2026-06-12"
difficulty: "easy"
kind: "Opinion"
reading_minutes: 4
tags: ["ai-agents","ai-coding","developer-productivity"]
---

# Teaching an agent to auto-fix bugs

A post on [Linear](https://swe.quest/sources/linear.md), published 2026-06-12, 4 min read, Opinion. Original: [https://linear.app/now/linear-agent-bug-fix](https://linear.app/now/linear-agent-bug-fix)

## Summary

Linear routes Datadog-detected problems into triage, where an automation assigns them to the Linear Agent to run a dedicated skill and attempt a fix. Dead feature flags (a flag evaluating the same way 100% of the time) are one-shot nearly every time because the task is narrow and uniform. Failing background tasks (failure rate above 0.2%) vary too much and get the right fix only about a third of the time, so confidence gates make the agent prove it understands the problem before writing a PR. Success depends on scoping tasks tightly and leaving context for the agent: skills, encoded conventions and legible code.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- feature flags ([easy posts on Deployment](https://swe.quest/tags/deployment.md?difficulty=easy))
- monitoring alerts ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

Linear Agent, Linear, Datadog

## Related posts

- [Agents hate friction: early thoughts on building for agents](https://swe.quest/articles/agents-hate-friction-early-thoughts-on-building-for-agents-c67afa5894bd3968.md): ClickHouse · 2026-06-29 · Easy · 9 min read · AI agents, Developer tools, Evaluation, LLMs
  Tools designed with good human developer experience (CLIs, SDKs) work with agents but often only adequately, because agents use them differently and abandon products when they hit friction.
- [Agent experience and agent-led growth: a chat with Caelean Barnes](https://swe.quest/articles/agent-experience-and-agent-led-growth-a-chat-with-caelean-barnes-92e47c9e7361bcbe.md): Mux · 2026-11-03 · Easy · 21 min read · AI agents, AI for coding, Evaluation, Developer tools, Documentation
  Coding agents like Claude Code and Codex increasingly choose which developer tools get adopted, and Gauge measures that choice by running agents in sandboxes, checkpointing sessions, and testing variants of prompts, docs, skills and CLIs against success criteria over many trials.
- [IBM and UC Berkeley Diagnose Why Enterprise Agents Fail Using IT-Bench and MAST](https://swe.quest/articles/ibm-and-uc-berkeley-diagnose-why-enterprise-agents-fail-using-it-bench-and-mast-8ef90262771faa1d.md): Hugging Face · 2026-02-18 · Medium · 10 min read · AI agents, Evaluation, LLMs, SRE
  Applying the MAST failure taxonomy to 310 annotated ITBench SRE agent traces shows that frontier models fail in isolated ways (Gemini-3-Flash averages 2.6 failure modes per failed trace).
- [Skill Issue, Writing /skills to solve agent failures](https://swe.quest/articles/skill-issue-writing-skills-to-solve-agent-failures-84b24819a17adea0.md): Railway · 2026-06-24 · Medium · 6 min read · AI agents, AI for coding, Developer tools
  Agents driving Railway failed because they lacked platform knowledge: they guessed CLI flags, ignored the 30-tool MCP server unless told to call it, and invented features.
- [Agent-driven development in Copilot Applied Science](https://swe.quest/articles/agent-driven-development-in-copilot-applied-science-57df9b7433878456.md): GitHub Engineering · 2026-03-31 · Medium · 9 min read · AI for coding, AI agents, Developer productivity, Evaluation, Testing
  A Copilot Applied Science researcher built eval-agents, a set of Copilot SDK-based agents that automate analysis of coding-agent trajectories from benchmarks like TerminalBench2 and SWEBench-Pro, and developed it primarily through coding agents.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
