# Next.js 16.5 RC, Storybook 11 RC: upgrades for agents and CI

Two release candidates from November 24 to 30 reworked their upgrade commands for runs outside a person's terminal. Next.js 16.5.0 RC adds next upgrade --ci, which sets up a scheduled GitHub Actions workflow. Storybook 11.0.0 RC installs skills when an agent upgrades with CI=true.

- Language: en
- Published: 2026-12-01
- Tags: dev, web, nextjs, storybook, upgrade, agent, ci, github-actions, tooling
- URL: https://devs7ud.io/en/trends/nextjs-upgrade-ci-storybook-11-rc-agent-upgrade-commands-en
- Translation (ko): https://devs7ud.io/trends/nextjs-upgrade-ci-storybook-11-rc-agent-upgrade-commands.md

## Who runs the upgrade command

Between November 24 and 30, 2026, release candidates of two tools changed their upgrade commands. First, what each one is. Dates follow the GitHub release times in UTC.

- **Next.js.** The React framework from Vercel. 16.5.0 RC 0 shipped on November 28 and RC 1 on November 30.
- **Storybook.** A tool for developing, documenting, and testing UI components apart from the app. 11.0.0 RC 0 shipped on November 24, and RC 3 followed on November 30.

Here are the two releases in one line each.

- **Next.js 16.5 RC.** A new setup command moves upgrades into a scheduled GitHub Actions workflow.
- **Storybook 11 RC.** It fills in what an upgrade run by an agent used to skip without a word.

Our October 27 post, [What is leaving in Storybook v11 alpha](/en/deep-dives/storybook-v11-alpha-en), covered what version 11 takes out. This post looks only at the upgrade commands that changed in the RCs.

## next upgrade --ci: a scheduled upgrade

The release notes for Next.js 16.5.0 RC 0 list four changes around `next upgrade --ci`: the setup command itself, questions for the model and reasoning effort, secret registration, and handoff files for CI runs.

`--ci` does not run an upgrade. It is a setup command you run once in an interactive terminal. The "Upgrade with a coding agent" guide at the v16.5.0-rc.1 tag gives this command.

```bash
npx next@canary upgrade --ci
```

The command asks three things.

- **Upgrade policy.** Upgrade only for security advisories (`security`), or for every new stable release (`latest`). Passing `--ci security` or `--ci latest` skips this question.
- **Hosted agent.** Codex with an OpenAI API key, or Claude Code with an Anthropic API key.
- **Model and reasoning effort.** The model and effort the scheduled run will use.

![A redrawn terminal. Running npx next@canary upgrade --ci asks for the upgrade policy, the hosted agent for the scheduled workflow, and whether to open a setup pull request](/blog-img/nextjs-upgrade-ci-storybook-11-rc-agent-upgrade-commands/next-ci-setup.png "zoom")

_Image: devs7udio, redrawn from part of the example output in the [Next.js guide "Upgrade with a coding agent"](https://github.com/vercel/next.js/blob/v16.5.0-rc.1/docs/01-app/02-guides/upgrading/agent-upgrade.mdx)_

After the answers, the CLI uses the GitHub CLI to open a setup pull request. The pull request adds one file, `.github/workflows/next-upgrade.yml`. This is the excerpt from the guide.

```yaml
on:
  schedule:
    - cron: '0 0 * * *' # daily
  workflow_dispatch:

jobs:
  upgrade:
    uses: vercel/next-upgrade-action/.github/workflows/next-upgrade.yml@<commit>
    with:
      policy: security
      agent: codex
      # ...
    secrets:
      agent-credential: ${{ secrets.NEXT_UPGRADE_AGENT_CREDENTIAL }}
      publish-token: ${{ secrets.NEXT_UPGRADE_PUBLISH_TOKEN }}
```

The file pins the reusable workflow `vercel/next-upgrade-action` to a specific commit and records the version of the Next.js CLI used for setup.

**Two secrets**

After opening the pull request, the CLI walks through two repository secrets.

- **`NEXT_UPGRADE_AGENT_CREDENTIAL`.** An OpenAI API key for Codex or an Anthropic API key for Claude Code.
- **`NEXT_UPGRADE_PUBLISH_TOKEN`.** A fine-grained personal access token for this repository with read and write access to Contents and Pull requests.

The CLI reads the pasted value without showing it and stores it with the GitHub CLI. You can skip a secret and add it later with `gh secret set` or in the repository settings.

**Setup requirements**

- A GitHub.com origin, and a signed-in GitHub CLI account that can push to the repository and add workflow files.
- A single app using npm, pnpm, or Yarn 1, with one lockfile committed alongside its `package.json` on the default branch.
- Workspaces, Yarn 2 and later, and Bun are not supported.

## Where it stops before an agent starts

Once the setup pull request is merged, the workflow runs daily by default. You can change the schedule by editing the cron expression, or start a run by hand from the Actions tab. The guide says each run checks whether an upgrade is needed before it starts a hosted agent.

**One scheduled run**

- Scheduled run → Open upgrade pull request?
- Open upgrade pull request? → Check against the policy
- Check against the policy → Hosted agent
- Hosted agent → Pull request

_devs7udio drew the order described in the Next.js guide Upgrade with a coding agent._

**Handoff files**

`next upgrade --agent` normally starts an agent in the user's terminal. A scheduled workflow cannot use it that way, so RC 0 adds a handoff path. With that path, `next upgrade --agent=<policy>` writes its assessment to a file instead of launching an agent.

- When an upgrade is ready, it writes the usual migration guides and prompt.
- Otherwise it writes the status, one of unaffected, blocked, or unknown, with its reason.

**Other changes in the same RC**

- **`@next/mcp`.** It is not ready to be released, so it is marked private. It will not be published to npm with 16.5 releases.
- **Turbopack.** `turbopackMinifyBeforeChunking`, which minifies each module before chunking, is now on by default in production builds. Set `experimental.turbopackMinifyBeforeChunking: false` to turn it off.
- **RC 1.** `next/image` caps upstream image cache ages at 2^31 seconds, and `output: standalone` keeps immutable static assets when an adapter is configured.

## Agents that run with CI=true

Storybook 11.0.0 RC 0 carries several changes for upgrades run by agents. The central one is pull request #37404.

**Skills that went missing**

Coding agents set `CI=true` themselves to avoid prompts. Storybook treated such a run as CI and skipped the skills without a word. According to the pull request, 3 of 6 QA upgrades ended on Storybook 11 without skills.

From RC 0, a run detected as an agent gets the skills and the Storybook section in `AGENTS.md` even with `CI=true`. Real CI still skips them.

![A redrawn terminal. Running storybook upgrade --yes with CI=true used to print only No automigrations detected, and now prints a check mark next to skills](/blog-img/nextjs-upgrade-ci-storybook-11-rc-agent-upgrade-commands/storybook-skills.png "zoom")

_Image: devs7udio, redrawn from the before and after output in [Storybook pull request #37404](https://github.com/storybookjs/storybook/pull/37404)_

**The section written to `AGENTS.md`**

In the same RC, #37421 changes the section that `create storybook` and `storybook upgrade` write to `AGENTS.md`.

- It names the two skills to open first, `/component-docs` and `/write-stories`.
- It gives the command that tests stories, `npx storybook tools test run`.
- A review is created only when the user asks. The section instead tells the agent to mention the `/ui-review` skill after a visible change.

**Toolsets in the MCP addon**

#37676 removes the `toolsets` option and the `X-MCP-Toolsets` request header from `@storybook/addon-mcp`. The MCP server now offers every tool the project supports. The pull request calls out the breaking part: tools you had turned off come back after the upgrade. To keep an agent away from some tools, it says to restrict them in the agent's own tool permissions.

## Sandboxes, age gates, skipped projects

RC 1 (November 26) and RC 3 (November 30) fix cases where an upgrade stopped or went wrong quietly.

| Case | Before | After |
| --- | --- | --- |
| Agent sandbox that blocks ports or localhost \(\#37433\) | Wrong advice, and the skills told the agent to escalate every Storybook command. One Codex session needed 13 approvals | Only commands that cannot run in the sandbox say so, once, and ask for escalated permissions |
| Package age gate \(\#37792\) | Stopped with the package manager's error while downloading the new CLI | The precheck runs before the download, so upgrade and init work |
| Upgrade that skips a major \(\#37439\) | No blocker when package.json declares a range such as ^8.6.15 | Reads the installed version and blocks |
| Storybook it cannot read \(\#37440\) | Skipped with no reason on screen | Names the project and the real error in one line, then continues with the rest |
| &#64;storybook/nextjs \(\#37789\) | The nextjs-vite automigration was silently skipped under --yes | Selected by default. Declining warns that it will be removed in Storybook 12 |
| Upgrading with npm \(\#37816, RC 3\) | Peer-only packages could disappear while the upgrade reported success | Installs once more to put them back |

_Source: Storybook 11.0.0 RC 1 and RC 3 release notes and the pull request descriptions_

Two rows need a note.

- **Age gate.** A setting that blocks installing package versions published too recently. According to pull request #37792, Yarn 4.15 and later give new projects a one-day gate by default, so projects that never opted in could not move to a freshly released Storybook either.
- **Sandbox.** Pull request #37433 says coding agents run commands in a sandbox that blocks ports and localhost: Codex by default, Claude Code and Cursor when enabled. Commands that look up docs and stories now run on the project's config with no notice. Only `test run`, `review create`, `stories preview`, and `storybook dev` print one message asking to re-run with escalated permissions.

## Same direction, different places

Here are the two releases against the same questions.

| Item | Next.js 16.5 RC | Storybook 11 RC |
| --- | --- | --- |
| Who starts the upgrade | A scheduled workflow | A command typed by an agent or a person |
| What the agent gets | Migration guides and Skills, handoff files | Skills and a section in AGENTS.md |
| What is left for people | Merging the setup pull request, registering secrets, reviewing the upgrade pull request | Approving escalated permissions, checking skipped projects |
| Current limits | A single app on npm, pnpm, or Yarn 1 | Release candidate stage |

_The row labels are devs7udio's, not from the sources. Cell contents come from the release notes, pull requests, and the guide._

![A four-step diagram. Schedule, check, agent, and pull request are joined by arrows, with a chip reading next upgrade --ci above and stops early when nothing to upgrade below](/blog-img/nextjs-upgrade-ci-storybook-11-rc-agent-upgrade-commands/flow.png)

_Image: devs7udio, a diagram of the scheduled upgrade flow in Next.js_

Next.js moved the place where an upgrade starts, from a person's terminal to a scheduled workflow. Storybook left that place alone and fixed what went wrong when an agent typed the command.

## What to check in the RCs

- **Both are release candidates.** Neither set of release notes gives a date for the stable release. The Next.js guide marks the feature experimental, and its example runs `next@canary`.
- **Scheduled upgrades in Next.js hold your keys.** You register the agent's API key and a token that can write to the repository as secrets. The result is a pull request for review, not an automatic merge.
- **Storybook's agent detection has a condition.** Pull request #37404 says an agent is detected through std-env or the `AI_AGENT` environment variable. Any run it does not detect, with `CI` set, counts as real CI.

## Opinion

For a solo developer or a small team, framework upgrades are easy to put off. If you try scheduled upgrades, starting with the `security` policy is the safer choice. It opens fewer pull requests to review.

There are three things a person should look at in an upgrade pull request opened by an agent.

- **Lockfile changes.** What changed besides the package you meant to upgrade.
- **Commands used to verify.** Whether it ran the build, the tests, or both.
- **Skipped items.** Anything the tool passed over without applying.

Most of the Storybook fixes change output text. They say in one line what was skipped, why, and which command needs permission. Once a framework CLI assumes an agent is the user, these lines become the interface. A person who sees odd output stops and looks it up, while an agent picks its next action from what the output says.

## Sources

- [Next.js v16.5.0-rc.1 release](https://github.com/vercel/next.js/releases/tag/v16.5.0-rc.1) — GitHub, November 30
- [Next.js v16.5.0-rc.0 release](https://github.com/vercel/next.js/releases/tag/v16.5.0-rc.0) — GitHub, November 28
- [Set up CI upgrades with next upgrade --ci](https://github.com/vercel/next.js/pull/102432) — Pull request \#102432
- [Upgrade with a coding agent](https://github.com/vercel/next.js/blob/v16.5.0-rc.1/docs/01-app/02-guides/upgrading/agent-upgrade.mdx) — Guide at the v16.5.0-rc.1 tag
- [Storybook v11.0.0-rc.3 release](https://github.com/storybookjs/storybook/releases/tag/v11.0.0-rc.3) — GitHub, November 30
- [Storybook v11.0.0-rc.0 release](https://github.com/storybookjs/storybook/releases/tag/v11.0.0-rc.0) — GitHub, November 24
- [Install the skills when an agent upgrades with CI=true](https://github.com/storybookjs/storybook/pull/37404) — Pull request \#37404
- [Handle a sandbox that blocks ports or localhost](https://github.com/storybookjs/storybook/pull/37433) — Pull request \#37433
