The problem
A small product team gets bug reports, feature requests and questions in one GitHub issue list, and someone spends part of every morning reading them, adding labels and hunting for duplicates. Reports without reproduction steps sit open for weeks because nobody asked for the details.
Architecture
- Channel
- New issue or comment
- Agent
- claude-code-action
- /triage-issue command
- Tools
- Read only gh wrapper
- Label script, two calls
- Human
- Maintainers change labels
Where the data stays: Issues stay in GitHub; the job reads code and writes labels only, with web access and file edits off.
Design flow
- Issue opened or comment added
- Workflow runs Claude with /triage-issue
- Reads labels, the issue and its comments
- One type label plus area and platform
- Bug missing details: needs-repro or needs-infoOnly sometimes
- Maintainers review and change any labelHuman checkpoint
Setup
Total time: 3 h 45 min our estimate
- 45 min
Done when: gh label list shows bug, enhancement, question, invalid and duplicate, your area and platform labels, and needs-repro and needs-info, with no near duplicates.
- 45 min
Done when: Your .claude/commands/triage-issue.md says: only labels from the list, exactly one type label on a new issue, lifecycle labels only on bugs, never post a comment.
- 45 min
Done when: The wrapper allows only label list, issue view, issue list and search issues, and the label script is capped at two calls a run.
- 40 min
Done when: It runs on issue opened and comment created, skips pull request comments and bots, has contents read and issues write only, a 10 minute timeout, and WebFetch, WebSearch, Write and Edit disallowed.
- 20 min
Done when: A vague bug gets bug and needs-repro, a question gets question only, a detailed bug gets no lifecycle label, and no comment is posted on any of them.
- 30 min
Done when: For one week a maintainer checks every label the agent set, and wrong needs-repro or needs-info labels are rare enough to let issues auto close after 7 days.
Ticks are saved on this browser.
Risks and data
Data
Anyone who can open an issue triggers the job, so the issue text is untrusted input; the job can only read code and edit labels. In a private repository issues can hold customer details, and authentication runs through Workload Identity Federation in the source, otherwise keep the API key in repository secrets.
How it goes wrong
A wrong needs-repro or needs-info label closes a real bug after 7 days, and a wrong type label sends it to the wrong person. The rule is 'when in doubt, don't apply a lifecycle label', maintainers can change any label, and the first week of labels is checked by hand.
How the agent works
It starts
A GitHub Actions workflow runs when an issue is opened or a comment is added (it skips pull request comments and bots) and calls anthropics/claude-code-action with a /triage-issue command; the job can read the code and write to issues only, and web access and file edits are switched off.
The agent works
Claude may use only a small gh wrapper (label list, issue view, issue list, search issues) and a label edit script capped at two calls. On a new issue it reads the repository's labels, the issue and its comments, applies exactly one of bug, enhancement, question, invalid or duplicate, adds area and platform labels, searches open issues for duplicates, and adds needs-repro or needs-info only to bugs missing details (both auto close after 7 days). On a new comment it removes stale or autoclose when a human replies and removes needs-repro or needs-info only when real details arrive.
The result
It never comments and never invents labels, and maintainers can change any label it sets.
Worked example
Anthropic runs this on its public claude-code repository. The workflow file sets a 10 minute job timeout and a 5 minute Claude step, one run per issue with cancel in progress, model claude-opus-4-6 at the time of reading, and authentication through Workload Identity Federation instead of a stored API key. The command file's guiding rule: 'When in doubt, don't apply a lifecycle label', because false positives are worse than missing labels. No accuracy or time saved figures are published.
The workflow runs on the anthropics/claude-code-action GitHub Action and a Claude Code command file, so it is tied to Claude Code. Another coding agent would need its own GitHub integration and the same labels only rules rewritten for it.
Join the Agent OS Club
Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.
Founding offer, ends 31 December 2026 or at member 100
Join the Agent OS ClubBuilding this for an organization? Learn more at theagentiv.com
Sources
- https://raw.githubusercontent.com/anthropics/claude-code/main/.github/workflows/claude-issue-triage.yml
- https://raw.githubusercontent.com/anthropics/claude-code/main/.claude/commands/triage-issue.md
Published: 2026-10-28