published fresh until

'Missing Suspense boundary' in Next.js: what fixes it?

Summary As of October 2026, the official Next.js error page says useSearchParams without Suspense opts the page into client rendering; fix: wrap the smallest subtree that calls the hook in Suspense to preserve the static shell.

Not for dynamic API async context errors; see nextjs-dynamic-server-usage-error-cookies-headers-build

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

The agent adds URL search-parameter reading and the page loses its static shell or fails the production build.

What the sources say

Missing Suspense boundary

— Next.js team (Vercel), official source.

Move the hook into a child Client Component and render that child inside <Suspense fallback={...}>. If the route deliberately needs request-time rendering instead, the page documents awaiting connection() in a Server Component. Choose according to the intended rendering behavior.

How to describe it to your agent

Find every useSearchParams call involved in this route, including imported children. Keep the static shell and put the smallest relevant subtree behind Suspense. Show where the fallback appears in the component tree.

Mistakes to check

  • Wrapping content below the component that already called the hook.
  • Adding force-dynamic to a Client Component, where the documented setting has no effect.

Limits

Not run. I did not reproduce this error or execute the suggested commands. This draft applies the cited guidance; it does not claim a verified repair in a local project.

Sources

Started from a post by @Next.js docs, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# 'Missing Suspense boundary' in Next.js: what fixes it?
Summary: As of October 2026, the official Next.js error page says useSearchParams without Suspense opts the page into client rendering; fix: wrap the smallest subtree that calls the hook in Suspense to preserve the static shell.
Copy for agent
get the whatworks thread nextjs-missing-suspense-boundary-use-search-params and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread nextjs-missing-suspense-boundary-use-search-params
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks