Repository navigation
Document agent upgrades across Next.js - #99293
Conversation
Make the experimental agent upgrade workflow discoverable from the upgrading and CLI docs. Add a guide for policies, agent handoff, and reminders using the planned agentUpgrade setting ahead of the source rename.
Tests PassedCommit: 883ea26 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdc87cd4e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Rename the documented policy value and command examples so the guide uses the experimental-future spelling consistently. Reflow affected tables for the longer value.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
It consistently documents the nonexistent --agent flag instead of --ai and includes additional API and prompt inaccuracies.
Review effort: Balanced
Findings: 12
Open (12)
Replace unsupported --agent with --ai · New Use --ai in the getting-started command · New Update both references to use --ai · New Use --ai in the MCP guide · New Replace all seven --agent occurrences with --ai · New Fix cross-reference to use the supported --ai flag · New Replace unsupported --agent landing-page recommendation · New Replace unsupported --agent with --ai · New Update all --agent commands to use --ai · New Remove invalid true value from ExperimentalConfig documentation · New Use --ai in the canonical options table · New Document the supported --ai flag instead of --agent · New
What changed in this PR
Documents agent-guided Next.js upgrades and integrates the workflow across upgrade, CLI, configuration, and AI-agent documentation.
Changes:
- Adds an agent upgrade guide and
agentUpgradeAPI reference. - Documents policies, reminders, prompts, and migration behavior.
- Links the workflow from related guides and references.
| File | Description |
|---|---|
docs/02-pages/02-guides/upgrading/index.mdx |
Links Pages upgrades to the agent workflow. |
docs/01-app/03-api-reference/06-cli/next.mdx |
Documents the CLI option and policies. |
docs/01-app/03-api-reference/05-config/01-next-config-js/agentUpgrade.mdx |
Adds the configuration reference. |
docs/01-app/03-api-reference/05-config/01-next-config-js/agentFeedback.mdx |
Notes the create-next-app default. |
docs/01-app/02-guides/upgrading/version-16.mdx |
Recommends agent-guided version 16 upgrades. |
docs/01-app/02-guides/upgrading/index.mdx |
Links App upgrades to the agent workflow. |
docs/01-app/02-guides/upgrading/codemods.mdx |
Connects codemods with agent upgrades. |
docs/01-app/02-guides/upgrading/agent-upgrade.mdx |
Adds the primary workflow guide. |
docs/01-app/02-guides/mcp.mdx |
Updates MCP upgrade guidance. |
docs/01-app/02-guides/ai-agents.mdx |
Introduces agent-guided upgrades. |
docs/01-app/01-getting-started/18-upgrading.mdx |
Adds the guided-upgrade command. |
docs/01-app/01-getting-started/01-installation.mdx |
Links installation guidance to upgrades. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The MCP guide rewrite in #99583 replaces this section, so keep the guide unchanged here. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary Bring the MCP guide in line with `next-devtools-mcp` 0.4.0 and the runtime tools on canary. - describe the four connector tools (`nextjs_index`, `nextjs_call`, `nextjs_docs`, `browser_eval`) and explain that the docs and browser tools point the agent elsewhere instead of doing the work - replace the Playwright MCP integration with `agent-browser`, which `next-browser` merged into in 16.3 - list the runtime tools at `/_next/mcp` using the descriptions registered in `packages/next/src/server/mcp/tools`, including the previously missing `get_request_insights`, and correct `get_errors` (it does not return type errors) and `get_server_action_by_id` (it does not inspect component hierarchies) - add the `npx add-mcp next-devtools-mcp@latest` install option and note that Skills such as `next-dev-loop` call `/_next/mcp` directly - rebuild the example transcript with `nextjs_index` and `nextjs_call`, replacing the removed `nextjs_runtime` tool - document that the endpoint is enabled by default and can be turned off with `experimental.mcpServer: false`, and add that to troubleshooting - remove the "Using with agents" section, which repeated the capabilities in vaguer terms Stacked on #99293. Also removes the stale upgrade example, which relied on the `upgrade_nextjs_16` tool removed in `next-devtools-mcp` 0.4.0. ## Verification - Tool names and descriptions checked against `get-or-create-mcp-server.ts` and each tool file on canary - Connector tools checked against the `next-devtools-mcp` 0.4.0 README - `mcpServer` default checked in `config-shared.ts` - Prettier and `alex` pass on the changed file 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- NEXT_JS_LLM --> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>

Why?
Document the supported
next upgrade --agentworkflow without presenting the unfinishedexperimental-futurepolicy as the recommended path in feature guides.How?
experimental.agentUpgradeAPI reference.security,latest, andexperimental-futurepolicies in the upgrade guide, CLI reference, and config reference.next devandnext buildreminders, the DevTools Vulnerability Insight, and the defaultsecuritypolicy from Enable agent upgrade reminders by default #99311.Verification
experimental-future.Closes NAR-944