The 7 Steps to Build a Claude Code Subagent That Triages New Customer Feedback

November 12, 2026

A Claude Code subagent is a Markdown file with YAML frontmatter saved in .claude/agents/ for one project or ~/.claude/agents/ for all of yours; the body becomes the subagent's system prompt. To build one that triages new customer feedback, follow seven steps. Define the triage output, connect your feedback source over MCP, write the agent file with a specific description, limit it to read-only tools, choose a model, put your taxonomy and severity rules in the prompt, then run it and test it against incidents you already know about. The design choice that matters most: have the subagent read feedback that is already classified and counted, rather than reading raw tickets and estimating the numbers itself.

What a triage subagent should produce

Decide the output before writing the prompt. A useful daily triage has the same sections every time, so people can scan it and compare it with yesterday's:

SectionContents
SpikesThemes whose volume jumped against their recent baseline, with counts
New themesIssues that did not appear in the previous period
SeverityP0 to P2 per item, using your written rules
Who is affectedDistinct accounts, segments and notable customers
OwnerThe team that owns the product area
EvidenceTwo or three verbatim quotes with links to the source records
Suggested next stepOpen a ticket, alert support, or watch

The 7 steps

1. Define the triage job

Write one paragraph: what period it covers (for example, the last 24 hours), what counts as a spike, what severity levels mean, where the output goes and what the subagent must not do (for example, never create tickets without approval). That paragraph becomes the core of the system prompt. If you are still deciding which triage decisions to automate at all, start with the five rules for automating customer feedback triage.

2. Connect your feedback source over MCP

Subagents can use MCP tools; by default they inherit the main session's tools, including MCP servers. Add the server once. For Enterpret, the documented command is:

claude mcp add --transport http --scope user enterpret https://wisdom-api.enterpret.com/server/mcp
# then in Claude Code: /mcp, select Enterpret, Authenticate

If you are building your own server over a help desk instead, see the seven steps to build an MCP server over your support tickets.

3. Write the subagent file

Only name and description are required. Claude decides when to delegate based on the description, so make it specific to this job. Save this as .claude/agents/feedback-triage.md:

---
name: feedback-triage
description: Triages customer feedback from the last 24 hours. Use when asked
  for a feedback triage, a daily feedback check, or what customers reported
  since the last release.
tools: Read, Write, mcp__enterpret__*
model: haiku
---

You triage new customer feedback for the product team.

1. Get counts by theme for the last 24 hours and the previous 7 days
   from the feedback tools. Never estimate counts from examples.
2. Flag spikes (24h volume above 2x the daily 7-day average) and themes
   with no records in the previous 7 days.
3. Assign severity with the rules in triage-rules.md.
4. For each flagged theme, list distinct accounts and two verbatim quotes
   with source links.
5. Map each theme to its owner using owners.md.
6. Write the report to triage/YYYY-MM-DD.md in the format in format.md.
Do not create tickets or post messages.

4. Scope tools to read-only

The tools field is an allowlist; if you leave it out, the subagent inherits every tool. List only what triage needs: reading the rules files, writing the report and the feedback server's tools (mcp__enterpret__* allows every tool from that one server). Use disallowedTools to remove anything risky, or the mcpServers field to give this subagent a server the main session does not have.

5. Choose the model

The model field accepts haiku, sonnet, opus, fable, a full model ID or inherit. Triage is mostly reading tool results and applying rules, which suits Haiku. Switch to Sonnet if the subagent misjudges severity on your test cases. An effort field is also available if you want to tune how much the model thinks.

6. Put the taxonomy and rules where the subagent can read them

Keep severity rules, the owner map and the output format in small files in the repo, and tell the subagent to read them. They change more often than the prompt, and product or support leads can edit them without touching the agent file. If your feedback tool exposes the taxonomy, have the subagent use those theme names rather than inventing its own.

7. Run it and test it

Run it explicitly with an @-mention, for example @"feedback-triage (agent)" triage yesterday, or as the whole session with claude --agent feedback-triage. To run it on a schedule, call Claude Code non-interactively from cron or CI. Then test it: pick three or four past days when you know what happened (a bad release, an outage, a quiet day) and check whether it flagged the right themes, at the right severity, with counts that match your feedback system. Run the same day twice and compare.

Why counts should come from the source, not the subagent

A subagent that pulls 200 raw tickets and reports "about 40 customers mentioned login issues" is estimating from a sample, and its estimate will change between runs. In Enterpret's study of run-to-run instability across eight frontier models, raw models asked for the top themes in the same feedback changed more than half of their theme set between runs at 100 records, and their counts on matched themes moved 7.5 to 9.8%.

0 volume disagreement across 117 valid run pairs once a theme appeared in two runs of a taxonomy-grounded agent, against 7.5 to 9.8% movement for raw models. Source: Enterpret Research, "Same Feedback, Different Answer" (arXiv, 2026)

That is why step 2 matters more than the prompt. If the tool returns a count, the subagent can report it. If it returns examples, the subagent will guess.

Where Enterpret fits

Enterpret's MCP server gives the subagent tools built for this: resolve_taxonomy_scope finds the taxonomy nodes to filter on for a count or breakdown, run_graph_query answers with citation links to the supporting records, and find_user_quote returns verbatim quotes. Counts come from feedback already classified with Adaptive Taxonomy and linked to accounts. Enterpret's documentation notes that citation and quote coverage can be incomplete, so keep "verify the quotes" in your test step. To pull feedback into Claude Code while building a feature rather than triaging, see five ways to pull customer feedback into Claude Code.

Example: the morning report

Picture an engineering lead who runs the triage subagent from a scheduled job at 7 a.m. On a Tuesday it flags one spike: "CSV import fails on files with emoji in headers," 31 records from 18 accounts since Monday's release, P1 under the team's rules, owned by the data import team, with three quotes and links. The lead opens a ticket before standup. On Wednesday the subagent reports the theme back to its baseline. What worked: counts from the feedback system and a fixed format. What did not: the first version, which read raw tickets and reported a different number each time it ran.

What changes next

As engineering teams run more agents in their repos, customer feedback becomes one more source those agents consult, next to logs and tests. The triage subagent is a small first step toward agents that check what customers said before they change the code.

FAQ

Where do Claude Code subagent files live?

In .claude/agents/ for the current project, which you can check into version control, or ~/.claude/agents/ for all your projects. Each file is Markdown with YAML frontmatter, and the body is the subagent's system prompt.

Can a Claude Code subagent use MCP tools?

Yes. By default a subagent inherits the main session's tools, including MCP tools. You can limit it with the tools or disallowedTools fields, or give it a server of its own with mcpServers.

Which model should a feedback triage subagent use?

Start with Haiku, set with model: haiku, because triage mostly applies rules to tool results. Move to Sonnet if it misjudges severity on your test days.

Can a Claude Code subagent run automatically every day?

Yes. Run Claude Code non-interactively from a scheduler such as cron or a CI job, with the subagent set as the session agent or named in the prompt, and write the report to a file or channel.

If you want your subagents to read customer feedback that is already classified and counted, see how Enterpret works.

Research cited

  1. Bagal, V., Ganta, R., & Chellingi, P. (2026). Same Feedback, Different Answer: Measuring Run-to-Run Instability in Frontier-Model Customer Feedback Analysis. arXiv:2610.08036.

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

This is some text inside of a div block.
Related Guides
See all guides

AI That Learns Your Business

Generic AI gives generic insights. Enterpret is trained on your data to speak your language.

Book a demo

Start transforming feedback into customer love.

Leading companies like Perplexity, Notion and Strava power customer intelligence with Enterpret.

Book a demo