use-cases/automation-bug-triage.md +160 −0 added
1---
2name: Automate bug triage
3tagline: Turn daily bug reports into a prioritized list, then automate the sweep.
4summary: Ask Codex to check recent alerts, issues, failed checks, logs, and chat
5 reports, tune the list in one thread, then run that sweep on a schedule.
6skills:
7 - token: github
8 url: https://github.com/openai/plugins/tree/main/plugins/github
9 description: Read issues, pull requests, comments, review threads, and failed
10 checks when GitHub is part of your bug intake.
11 - token: $sentry
12 url: https://github.com/openai/skills/tree/main/skills/.curated/sentry
13 description: Inspect production errors, stack traces, affected releases, and
14 event context when alerts are part of the sweep.
15 - token: slack
16 url: https://github.com/openai/plugins/tree/main/plugins/slack
17 description: Read the channels or threads where teammates report bugs and
18 prepare a draft summary for a team channel.
19 - token: linear
20 url: https://github.com/openai/plugins/tree/main/plugins/linear
21 description: Read bug queues, find existing issues, draft updates, or prepare
22 linked follow-up tickets after the triage pass.
23bestFor:
24 - Teams that track bugs across Sentry alerts, Slack threads, Linear issues,
25 GitHub issues, failing PR checks, support tickets, or logs.
26 - Triage workflows you want to run manually in one Codex thread before
27 scheduling as an automation.
28starterPrompt:
29 title: Run a Bug Triage Sweep
30 body: >-
31 Run a bug triage sweep for [repo/service/team] covering the last [time
32 window].
33
34
35 Use these plugins: [@Sentry / @Slack / @Linear / @GitHub / none]
36
37
38 Input sources:
39
40 - Sentry: [project / alert link / none]
41
42 - Slack: [channel / thread links / none]
43
44 - Linear: [team / project / view / issue query / none]
45
46 - GitHub: [repo / issue query / PR checks / none]
47
48 - Other: [logs / support tickets / deploy link / dashboard / attached file /
49 none]
50
51
52 Output format:
53
54 First, name any input source you could not access.
55
56 Then return a prioritized list of bugs, sorted from P0 to P3.
57
58 If you find no bugs, say: No qualifying bugs found.
59
60
61 For each bug, include:
62
63 - Priority: P0, P1, P2, or P3
64
65 - Title
66
67 - Evidence (links or short citations)
68
69 - Recommended next action
70
71
72 Rules:
73
74 - Do not post, create, assign, label, close, rerun, or edit anything.
75
76 - Group duplicate reports under one bug.
77
78 - Keep observed evidence separate from guesses.
79relatedLinks:
80 - label: Codex automations
81 url: /codex/app/automations
82 - label: Codex plugins
83 url: /codex/plugins
84 - label: Codex MCP
85 url: /codex/mcp
86 - label: Use Codex in Linear
87 url: /codex/integrations/linear
88techStack:
89 - need: Where bug context gathers
90 goodDefault: Sentry alerts, Slack channels, Linear views, GitHub issues, PR
91 checks, support queues, on-call notes, logs, dashboards, and deploy notes
92 why: Name the exact queues, channels, views, repos, alert links, dashboards, and
93 files Codex should sweep.
94 - need: How Codex reads it
95 goodDefault: "[Plugins](/codex/plugins) for Slack, Linear, GitHub, and Sentry;
96 connectors; [MCP servers](/codex/mcp); repo CLIs; links; exports;
97 attachments; and pasted logs"
98 why: Install the existing integration when there is one. Build or configure a
99 small MCP server, CLI, export, or dashboard link for internal sources
100 Codex cannot read yet.
101---
102
103## How to use
104
105Ask Codex to check the places where bugs already appear: Sentry alerts, Linear issues, GitHub issues, PR checks, deploy logs, support tickets, and Slack threads. Start with one manual sweep, tune the report in-thread, then run it on a schedule.
106
107Use one Codex thread for the whole triage loop:
108
109
110
1111. Run an on-demand sweep and get a draft list.
1122. Review the list and give feedback in that same thread.
1133. Turn that same thread into an automation.
1144. Optional: ask Codex to draft Linear issues, Slack updates, GitHub comments, or handoff notes when you are confident in the report.
115
116
117
118Before you start, install the [plugins](https://developers.openai.com/codex/plugins) Codex needs, such as Sentry, Slack, Linear, or GitHub. In the starter prompt, replace the bracketed plugin list with real `@` plugin chips. Then replace each bracketed source with the exact place to search: a Sentry project or alert URL, Slack channel or thread, Linear team, view, or query, GitHub repo, issue query, or PR check, deploy link, log file, support queue, or dashboard.
119
120## Phase 1: Run the sweep
121
122Start Codex from the repo that owns the bugs when local context helps: tests, repo tooling, build checks, or CI failures. You can also run the sweep from any repo if your bug sources are available through plugins, connectors, MCP servers, links, exports, pasted logs, or attachments.
123
124Run the starter prompt above first. Keep only the plugins and sources that are part of your sweep.
125
126For example, a filled-in prompt can name the plugins and the exact queues, channels, or repos you want in the sweep.
127
128<div class="not-prose mb-12 rounded-xl bg-[url('/images/codex/codex-wallpaper-1.webp')] bg-cover bg-center p-4 md:p-8">
129 </div>
130
131## Phase 2: Make the report useful
132
133Before you automate, make sure the report is useful enough to read every day.
134
135A useful first run has:
136
137- High-signal bugs sorted from P0 to P3.
138- Duplicate reports are grouped under one bug.
139- Each bug has linked evidence or short citations.
140- Guesses are separated from observed facts.
141- Each bug has a short recommended next action.
142
143Tune the report in the same thread before you automate it. You can ask Codex to:
144
145- Check one more source before ranking the list.
146- Drop noisy alerts that the team already knows about.
147- Only return P0 and P1 bugs.
148- Merge Slack reports, Sentry alerts, and GitHub failures when they point to the same bug.
149- Show the single best link for each bug.
150- Add enough evidence that someone else can reproduce or route the issue.
151
152## Phase 3: Automate it
153
154When the on-demand report is useful, stay in the same thread and turn it into an automation. Codex can use what you refined in the thread to write the recurring automation prompt.
155
156**Create the automation**
157
158## Phase 4: Route follow-ups
159
160Once the scheduled report is useful, decide where the work should go next. Codex can draft a Slack update for a team channel, write Linear issues for the bugs you want to track, write GitHub comments for a failing PR, or produce a handoff for whoever is on call.