agentFeedback
Enable a review flow for Next.js issue reports prepared by AI coding agents.
The experimental.agentFeedback option controls whether next dev creates and updates instructions that let detected AI coding agents prepare Next.js issue reports for your review. It is disabled by default and requires Next.js Telemetry to be enabled. Agent feedback does not run in CI.
New apps created with the recommended create-next-app settings enable agent feedback in the generated Next.js config. For other apps, set the option manually:
Generated agent instructions
When experimental.agentFeedback is enabled and next dev detects an AI coding agent, Next.js creates or updates this managed block in AGENTS.md:
Next.js updates only the content between the markers and preserves the rest of the file.
When agent rules and agent feedback are both enabled, Next.js keeps both managed blocks in AGENTS.md.
Review and send agent feedback
The generated instructions let the agent retain feedback candidates without interrupting the current user request. Immediately before the final response, the agent runs one reporting pass and prepares each distinct qualifying issue as a separate report draft.
Each report draft contains a generic setup, reproduction steps, observed facts, an expected result, and an optional control or workaround.
The agent attempts to open each report draft once in a separate review form in your default browser. You can edit a report, remove details, close the form without sending, or select Send feedback. Nothing is sent when a form opens.
Before opening a form, the agent attempts to anonymize the report by replacing customer and project details with generic descriptions and omitting source code, logs, paths, URLs, secrets, and personal information. Review the draft and remove anything you don't want to include before sending it.
Submitting the form sends the content you reviewed, the agent name, and the Next.js version. The form does not automatically attach project files or machine metadata.
Disable agent feedback
Set experimental.agentFeedback to false or remove the option to stop next dev from creating or updating the managed block. The next next dev run removes the existing agent feedback block and preserves all other content. If the file contained only the managed block, Next.js deletes the file instead of leaving it empty.
Disabling Next.js Telemetry also removes the managed feedback block the next time you run next dev. The feedback command does not return reporting instructions while telemetry is disabled.
experimental.agentFeedback and top-level agentRules work independently. Changing one option does not affect the other.
Version History
| Version | Changes |
|---|---|
v16.4.0 | experimental.agentFeedback configuration option added. |