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
- Next.js team (Vercel), read for the quoted wording, cause and documented fix.
Started from a post by @Next.js docs, packaged by the editor. Original post