Skip to content

Enable agent upgrade reminders by default - #99311

Merged
devjiwonchoi merged 9 commits into
canaryfrom
jiwon/agent-upgrade-default-on
Sep 30, 2026
Merged

devjiwonchoi merged 9 commits into
canaryfrom
jiwon/agent-upgrade-default-on

Conversation

@devjiwonchoi

@devjiwonchoi devjiwonchoi commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Why?

Enable agent upgrade reminders by default and give the experimental Future Defaults policy a clear name.

How?

Rename experimental.agenticAutoUpgrade to experimental.agentUpgrade across config, runtime, docs, tests, and evals. Default it to true, which normalizes to the security policy while preserving explicit policies and false. Rename the future policy value to experimental-future, reuse the development advisory assessment, and preserve CI agent reminders.

Closes NAR-940

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T19:47:53.581203Z f24eb23 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: ea1d4da

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ac78ad955

ℹ️ 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".

Comment thread packages/next/src/lib/upgrade/nudge.ts Resolved
@aurorascharff

aurorascharff commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Was there a ENVVAR we used for testing too that needs to be renamed?

@aurorascharff

aurorascharff commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Potential issue with the normalization?

I found a behavior gap in the default-on path and I’m verifying it with the focused tests now: the parent dev process normalizes true to security, but the dev worker’s agent/non-interactive path appears to pass the raw true value into a function that only accepts string policies, causing it to return without checking. Build does not have this problem because it normalizes first.

checking this but i did approve already so you can have a look and see if we need to fix it

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from 7ac78ad to ea7ce22 Compare September 28, 2026 08:35
@devjiwonchoi
devjiwonchoi changed the base branch from canary to jiwon/human-upgrade-build-v2 September 28, 2026 08:35
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/human-upgrade-build-v2 branch from 6efd51f to 0e2029d Compare September 28, 2026 08:42
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from ea7ce22 to ade75de Compare September 28, 2026 08:57

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

Test fixture next.config.js still uses the old experimental key agenticAutoUpgrade, which is now an unrecognized key under the renamed agentUpgrade schema.

Fix on Vercel

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ade75de75a

ℹ️ 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".

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from ade75de to 34ea44b Compare September 28, 2026 09:05
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/human-upgrade-build-v2 branch 2 times, most recently from 9cac081 to c7539df Compare September 28, 2026 09:14
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from 34ea44b to 2230f00 Compare September 28, 2026 09:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2230f00f7e

ℹ️ 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".

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/human-upgrade-build-v2 branch from c7539df to 5453295 Compare September 28, 2026 09:41
Comment thread packages/next/src/cli/next-dev.ts Resolved
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/human-upgrade-build-v2 branch from 5453295 to 4edbf1d Compare September 28, 2026 09:45
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from 0bb1b7a to c71e1d8 Compare September 28, 2026 09:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c71e1d84fa

ℹ️ 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".

Comment thread packages/next/src/cli/next-upgrade.ts Resolved
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/human-upgrade-build-v2 branch 5 times, most recently from 024dab0 to e4e0518 Compare September 28, 2026 12:33
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch 3 times, most recently from 7988eb7 to 7116c51 Compare September 29, 2026 12:12
@devjiwonchoi
devjiwonchoi removed this pull request from stack #99212 September 29, 2026 12:15
@devjiwonchoi devjiwonchoi changed the title Enable agent upgrade reminders by default Enable upgrade prompts and default agent reminders Sep 29, 2026
@devjiwonchoi
devjiwonchoi changed the base branch from jiwon/human-upgrade-build-v2 to canary September 29, 2026 12:15
Rename the experimental option to agentUpgrade and resolve true to the security policy so new apps receive upgrade reminders without configuration.
Use an explicit experimental policy name across config, CLI, prompts, evals, and tests. Update the remaining e2e fixture to exercise a valid configured policy.
Reuse the startup advisory result so default-enabled dev does not fetch it twice. Rename the private test override and describe the reminder without implying explicit configuration.
Reuse the dev assessment only when it ran, so CI agents still assess security upgrades. Match the current reminder copy in tests and use the renamed Future CLI value in eval prompts.
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/agent-upgrade-default-on branch from 7116c51 to 940f9e9 Compare September 29, 2026 12:25
@devjiwonchoi devjiwonchoi changed the title Enable upgrade prompts and default agent reminders Enable agent upgrade reminders by default Sep 29, 2026
@devjiwonchoi

Copy link
Copy Markdown
Member Author

@codex review again

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 940f9e9955

ℹ️ 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".

The guide still names the removed future policy for canary installations. Use experimental-future so agents follow a policy accepted by the CLI.
@devjiwonchoi

Copy link
Copy Markdown
Member Author

@codex review again

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfda7ad983

ℹ️ 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".

The worker already assesses upgrades for DevTools, but the parent repeated that lookup on interactive startup. Send the settled result over IPC and reuse it for the prompt, with a parent retry if the worker assessment fails.

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The agent upgrade nudge's retry receipt is single-use (deleted on consumption) and authorization is only kept in a per-worker in-memory set, so a routine dev-server restart re-blocks and fatally kills next dev for agent sessions on security-affected releases.

Fix on Vercel

A config restart discards the worker that consumed the retry receipt, causing the replacement worker to block startup again. Send accepted retry identities to the long-lived dev parent and pass them to replacement workers for that session. Cover worker restart and fresh-session behavior.
Declaration generation rejected the untyped IPC callback with TS7006. Give the callback error an explicit Error or null type while preserving the retry handoff behavior.
@devjiwonchoi

Copy link
Copy Markdown
Member Author

@codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f24eb23c75

ℹ️ 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".

Type the isolated nudge module reloads from the existing imported function instead of a source-path type import. This preserves the test runtime while keeping Next.js source out of the root TypeScript task.
@devjiwonchoi
devjiwonchoi enabled auto-merge (squash) September 30, 2026 05:45
@devjiwonchoi
devjiwonchoi merged commit 50e90fb into canary Sep 30, 2026
220 of 222 checks passed
@devjiwonchoi
devjiwonchoi deleted the jiwon/agent-upgrade-default-on branch September 30, 2026 05:50
aurorascharff added a commit that referenced this pull request Oct 2, 2026
### Why?

Document the supported `next upgrade --agent` workflow without
presenting the unfinished `experimental-future` policy as the
recommended path in feature guides.

### How?

- Add a human-facing Agent Upgrade guide and an
`experimental.agentUpgrade` API reference.
- Link the workflow from the App and Pages upgrade docs, CLI reference,
and AI agent guide.
- Document the `security`, `latest`, and `experimental-future` policies
in the upgrade guide, CLI reference, and config reference.
- Keep the dedicated Skills as the recommended path for Cache
Components, Partial Prefetching, and the combined Instant Navigation
migration.
- Explain that version upgrades provide the applicable migration guides
and Skills to the coding agent.
- Show the interactive agent, model, reasoning, Auto-permission, and
worktree prompts.
- Document the non-blocking `next dev` and `next build` reminders, the
DevTools Vulnerability Insight, and the default `security` policy from
#99311.

### Verification

- Prettier passes on all changed documentation files.
- Targeted ESLint passes with no errors.
- Alex reports no new warnings in the changed content.
- Feature guides recommend the dedicated Skills instead of
`experimental-future`.

<!-- NEXT_JS_LLM -->

Closes NAR-944

---------

Co-authored-by: Aurora Scharff <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants