The best tools to let an AI agent debug your React app in 2026, run on one real bug
Six tools ran on one React bug where putting an order on hold re-rendered all 13 rows. Four named the prop an agent could act on. One returned a pass or fail verdict with an exit code.
Give your agent a browser driver first, agent-browser or Playwright MCP, so it can click and read the page. Then add the tool that answers your question. Genie names why a component rendered and returns a pass or fail exit code for the fix. agent-react-devtools gives a component tree and a render profile on the command line. Chrome DevTools MCP covers load time, INP and memory. react-scan and the React DevTools panels are built for a person watching. why-did-you-render writes to the console, which an agent can read once you change one option.
I ran six of these tools on the same bug in this repo and kept every command and output in the evidence file. I did not run Playwright MCP or the React DevTools extension. Their rows come from their docs. The Genie steps were re-run on Genie 1.1.0, and the Genie output below comes from that re-run.
One bug, one click, six tools
The Meridian Ops dashboard (apps/realworld-dashboard) lists orders in a virtualized table. Each row
is a memoized OrderRow. Putting one order on hold re-renders every visible row, because the table
rebuilds the row callback whenever the order list changes:
const onStatusChange = useCallback(
(id: string, status: OrderSummary['status']) => {
const order = rows.find((row) => row.id === id)
if (order) changeStatus({ id, number: order.number, status })
},
[rows, changeStatus],
)The interaction was the same in every run. The agent opened the Actions menu for SO-105979, clicked Put on hold, and waited for the toast:
agent-browser --session art-m1 find role button click --name 'Actions for SO-105979'
agent-browser --session art-m1 find role menuitem click --name 'Put on hold'
agent-browser --session art-m1 wait --text 'SO-105979 updated'Genie counted 13 mounted rows, all 13 updated, and 29 OrderRow renders in total.
What each tool told the agent
Genie answers on the command line. The agent opens a render window, runs the interaction, and waits until React, Query and Router are all settled, so the refetch after the mutation lands before the read:
npx genie-react call react_clear_renders '{"component":"OrderRow"}' --session upd-g
# Run the three agent-browser commands above, with --session upd-g.
npx genie-react call devtools_wait '{"condition":"settled","domains":["react","query","router"],"timeoutMs":10000}' --fail-on-result-error --session upd-g
npx genie-react call react_render_causes '{"component":"OrderRow","limit":3}' --session upd-greact_render_causes names the prop for each row and grades the evidence (trimmed to two of 29
events):
OrderRow #13713092378813 {renderEventId:render:17:241,mountId:mount:6,key:o-105915}
← props exact onStatusChange
OrderRow #13713092378779 {renderEventId:render:17:240,mountId:mount:5,key:o-105917}
← props exact onStatusChangeagent-react-devtools also answers on the command line. profile rerenders printed one line per
row, all 13 with the same culprit (trimmed to two):
? [memo] Memo(OrderRow) 2 renders causes:props-changed changed: props: onStatusChange
? [memo] Memo(OrderRow) 2 renders causes:props-changed changed: props: order, onStatusChangeagent-browser has its own React profiler. Open the session with --enable react-devtools, then
react renders start and react renders stop. Its change details listed
OrderRow props.onStatusChange: fn() -> fn(). Its counts did not match the other tools: it reported
26 OrderRow instances and 122 re-renders for a page with 13 rows.
why-did-you-render writes to the browser console, which an agent reads with
agent-browser console. With the setup from its README and trackAllPureComponents: true, it logged
nothing about OrderRow. With logOnDifferentValues: true it logged 10 OrderRow groups and traced
the callback one step further than any other tool, to the useCallback dependency:
[log] {prev onStatusChange:parent-hook-useCallback-deps[0]: Array(1054)} !== {next onStatusChange:parent-hook-useCallback-deps[0]: Array(1054)}react-scan drew OrderRow ×2 over each row. With log: true it printed 29 console groups named
OrderRow, with no prop names inside. With its default toolbar on, the toolbar covered the Actions
button of the last visible row, and agent-browser refused the click.
Chrome DevTools MCP traced the click and reported no problem (trimmed to one sentence):
The longest interaction on the page was a `pointerdown` which had a total duration of `28 ms`.The trace lists React's Components ⚛ track, but its summary named no component. On this machine the click cost 28 ms. The bug shows up as wasted renders, and the trace summary does not count renders.
Only one tool returned a verdict
To prove the fix, Genie's verify takes claims before the interaction and returns an exit code
after it. The claim allows mount because three rows below the fold mounted during the click, and a
mount is not the bug:
npx genie-react verify begin --session upd-g --name 'put one order on hold' \
--claim 'render OrderRow only props.order,mount' --claim 'render OrderRow min 1' --claim 'boundaries clean'
# Run the three agent-browser commands above, with --session upd-g.
npx genie-react verify end <id> --session upd-gBefore the fix, trimmed to the verdict and first claim (exit code 1):
fail vfy_673952a4-e627-4f4c-b938-f894742abd3a "put one order on hold" 10 commits, quiet after 830 ms (react, query, router, network)
1 fail render OrderRow only props.order,mount {renders:29,events:29,violatingEvents:26,causes:[mount,props.onStatusChange,props.order]}The fix is the reference fix from the answer key. The callback takes the whole order, so it no longer
depends on rows:
const onStatusChange = useCallback(
- (id: string, status: OrderSummary['status']) => {
- const order = rows.find((row) => row.id === id)
- if (order) changeStatus({ id, number: order.number, status })
- },
- [rows, changeStatus],
+ (order: OrderSummary, status: OrderSummary['status']) => changeStatus({ id: order.id, number: order.number, status }),
+ [changeStatus],
)OrderRow changes to call onStatusChange(order, 'on_hold') and its prop type changes with it. After
the fix, the same claims passed with exit code 0:
pass vfy_dd4ac4d4-d0e2-4ab7-aa00-2dbaf890c7fa "put one order on hold" 10 commits, quiet after 2015 ms (react, query, router, network)
1 pass render OrderRow only props.order,mount {renders:5,events:5,violatingEvents:0,causes:[mount,props.order]}agent-react-devtools can compare two exported profiles with profile diff. It ranks components by
average render time. With the default threshold, OrderRow was missing from the diff. With
--threshold 0 it showed renders: 29 -> 5. The command exits 0 either way, so the agent still has
to judge the result itself. See Verify a fix for Genie's claim forms.
What each tool reads, how it installs, and what it proves
| Tool | What an agent can read | How it installs | React Native | Proves a fix |
|---|---|---|---|---|
| Genie | Render causes with evidence grades, effects, Query, Router, error boundaries, as CLI text or JSON | genie-react init adds it to Vite or Next.js. Other bundlers and React Native set up the hook by hand | Yes, with agent-device as the driver | Yes. verify exits 0, 1, 4 or 5 |
| agent-react-devtools | Component tree, props, state, hooks, render profiles with changed props, on its CLI | npm package, Vite plugin or connect import, local daemon | Yes, through a Metro wrapper | Compares two profiles. No pass or fail |
| react-scan | Outlines on the page. Component names in the console with log: true. An onRender API | Script tag, or npx -y react-scan@latest init | Its README does not mention it | No |
| why-did-you-render | Console groups with prop and hook diffs | npm package, a wdyr file, and the library as JSX import source | Yes, per its README | No |
| React DevTools | Components and Profiler panels, built for a person | Browser extension, or the react-devtools npm package | Built into React Native DevTools from 0.76 | No |
| Chrome DevTools MCP | Traces, INP and LCP insights, console, network, heap snapshots | MCP server config, npx -y chrome-devtools-mcp@latest | Its README does not mention it | No. It measures, and the agent compares |
| Playwright MCP | Accessibility snapshots, console, network, script evaluation | MCP server config, npx @playwright/mcp@latest | Its README does not mention it | It checks the screen, not renders |
| agent-browser | Accessibility snapshots with refs, console, errors, and react commands | npm install -g agent-browser, then agent-browser install | Not a native driver. Genie uses agent-device there | It checks the screen, not renders |
Which tool for which job
- To let the agent click, type and read the page, use agent-browser or Playwright MCP. Playwright's README itself points coding agents to its CLI and skills, which use fewer tokens than the MCP server.
- To find a slow page load, a bad INP score or a memory leak, use Chrome DevTools MCP. Genie does not run Lighthouse or Chrome's performance insights.
- To watch re-renders while you click around yourself, use react-scan. The overlay shows the problem with no reading at all.
- To see why a prop changed identity, through
useCallbackanduseMemodependencies, turn on why-did-you-render withlogOnDifferentValues. In this run it went one step deeper than Genie, which namedonStatusChangebut not therowsdependency behind it. - To give an agent a React tree and a profile on the command line, use agent-react-devtools.
- To have the agent name the cause with a grade, and prove the fix with an exit code your CI or
reviewer can trust, use Genie. The renders and effects guide
shows the reads, and another article walks this same
bug through
verify.
When Genie is not the answer
Genie needs a development build of React 18 or newer, so it cannot profile production. It does not
see the screen, so you still need the driver to confirm what the user sees. Your app also has to
install genie-react. If you only want to look at one slow page once, react-scan or the React
DevTools Profiler gets you there with less setup.
Find wasted re-renders in React Native with an AI agent: one tap rendered 29 components
An agent drove an Expo app on the iOS Simulator with agent-device, used Genie to find why one tap rendered 29 components, and proved a fix that cut it to 4.
react-scan vs why-did-you-render vs Genie: which one can your AI agent actually read?
One React bug, three tools. react-scan logged 29 component names with no cause. why-did-you-render logged nothing until one option changed. Genie named the prop on the CLI and failed the run with exit 1.