Next.js 16.5 with Pantheon helps you automate site upgrades safely

| 3 min read

In this blog

Next.js 16.5 has landed, and its headline feature is next upgrade --ci.

It is a new CLI command that automates Next.js version upgrades inside CI pipelines, using hosted coding agents.

To get started, run next upgrade --ci once in your repository, and Next.js sets up an automated GitHub Actions workflow for you. Now, a hosted coding agent will check for new Next.js releases, apply the necessary codemods, run your verification checks, and open a pull request for your review.

So instead of subscribing to Next.js release notes and interrupting your planned work to manage an upgrade, your GitHub Action will help keep Next.js current automatically.

It is fantastic to see the Next.js team focus on site maintenance. In production, the hidden tax of running a site comes from keeping everything secure and current. At Pantheon, we call this problem Upgrade Gridlock. 

The universal problem of site maintenance 

Update Gridlock happens when framework releases and security notices pile up faster than you can ship it, and begins to block your feature and design work. 

Without automated tooling and safe staging environments, you can’t verify changes fast enough to merge them. So pull requests sit untouched, technical debt compounds, and your sites quietly fall behind.

For years, the Next.js framework’s rapid core updates contributed to this bottleneck. Every release meant manually bumping versions in package.json, scouring release notes for breaking changes, and running codemods to refactor deprecated APIs. 

When major shifts arrived, like the App Router or Turbopack as the default bundler, you could easily lose half a day hunting down edge cases, fixing TypeScript errors, and verifying builds. Because every upgrade was slow and disruptive, you naturally put them off until an urgent security patch forced a high-risk, multi-version jump.

If you've made the wrong turn into Update Gridlock, you are far from alone. A scan of live Next.js deployments shows nearly 300,000 outdated sites still running Next.js 15, 14, or even 13. 

How Next.js is making site upgrades easier

To ease Upgrade Gridlock for developers, Next.js brought upgrades directly into the core CLI in version 16.1. Instead of juggling external codemods and scattered documentation, you could now run a single built-in command.

That feature managed your dependency bumps, applied the right codemods, and generated version-matched migration guides so a local coding agent could apply the changes and verify your app. 

This first step was great for maintaining a single application, but what if you had a fleet of sites under your care?

Automated, cloud-based updates

Thanks to AI, the pace of the Nextjs team shipping minor releases and security patches has sped up. A human-initiated local workflow cannot survive that cadence. Even with the upgrade feature in the CLI, you still have to notice each release, pull the branch, run the utility locally, verify the build, and open a PR.

If you manage five, 20, or 50 Next.js sites, traffic stalls all over again—and keeping dependencies current turns into an unsustainable full-time job.

How `next upgrade --ci` works

Next.js 16.5 takes the upgrade loop off your laptop and puts it into GitHub Actions. When you run next upgrade --ci the interactive setup configures three pieces for your repository:

  • Policy-driven updates: Choose security (to automatically absorb vulnerability patches) or latest (to stay current on feature releases), written directly into your workflow.
  • Hosted agent integration: Pick your preferred coding agent, such as Claude Code or Codex, and register your provider API keys. GitHub Actions will task your agent with handling the upgrade when a change is available. 
  • Structured CI handoffs: Next.js 16.5 generates dedicated handoff files for CI runs, giving the agent the exact migration context it needs to apply updates, run checks, and open a pull request.

Pantheon provides the missing piece 

Ok, so automating your PRs clears the first lane of Upgrade Gridlock. But if you run decoupled sites with a Next.js frontend backed by WordPress or Drupal, a passing CI build is only half the battle. 

Before you merge, you still need to verify how each frontend change behaves against your live CMS data, caching layers, and content workflows.

That’s where Pantheon’s WebOps platform comes in.

When next upgrade --ci opens a pull request, Pantheon’s GitHub integration automatically spins up an isolated Multidev environment for that branch. 

You, your QA team, and your automated review agents can inspect a live, URL-accessible build connected directly to its WordPress or Drupal backend.

Pairing Next.js 16.5 with Pantheon’s Multidev helps you spend your time shipping new experiences instead of fighting Upgrade Gridlock. Upgrade to Next.js 16.5 today, run next upgrade --ci and put WebOps to work on Pantheon.

Author

  • Hashim Warren
    Product Marketing Manager - Next.js

In this blog

Related blog posts

Next.js 15 Support Ends Soon: Your Guide to Moving to v16 Without a Headache

4 min read
Read More

How to Ship Websites Faster Without Chasing New Coding Models

7 min read
Read More

Headless Beyond the Hype: How americaneagle.com and Planeteria Make Decoupling Work

5 min read
Read More
Request a Pantheon platform demo