fix(web): pin Next.js back to 16.3.5 to restore /flows and /docs (prod 500s)
Production incident
https://agentrelay.com/flows and every https://agentrelay.com/docs/<slug> page (e.g. /docs/introduction) have returned 500 Internal Server Error since #126 (Next.js 16.3.5 ā 16.3.8) deployed at 2026-10-02 04:40 UTC.
This PR reverts 646f9cc. Only web/package.json and package-lock.json change, back to exactly what was deployed and healthy on 2026-10-01.
Evidence
- The preview build of #126, which contains only the version bump, returns 500 on
/flowsand/docs/introduction(https://8b743c8b-agentrelay-web.agent-workforce.workers.dev). So do the previews of #127 and #128, which were built on top of it. - Under 16.3.8 every prerendered page answers with
x-nextjs-cache: MISS, including pages that return 200 (/,/blog,/about). The static-assets incremental cache is no longer hit, so the Worker renders at request time.web/open-next.config.tsand thePopulate static-assets cachestep indeploy.ymlboth document that a runtime render of docs pages fails in the Workers runtime. - The same 500 is returned by
origin-web.agentrelay.comdirectly, so the router Worker is not involved. - Upstream report of the same mechanism: opennextjs/opennextjs-aws#1269 ("Next 16.3.8: build-time prerendered entries are never read").
Not yet captured: the runtime exception from the Worker logs. The cache-miss mechanism is inferred from response headers and the upstream report.
How to verify before merging
On this PR's preview URL, both of these should return 200:
/flows/docs/introduction
Follow-ups (not in this PR)
- Do not re-attempt the 16.3.8 upgrade until the OpenNext adapter reads the new prerender cache keys.
- CI and the preview workflow passed on #126 while two top-level pages were 500ing. A post-build smoke check of a few prerendered routes on the preview would have caught it.
@khaliqgant ā needs the two reviews plus a human merge to deploy.
š¤ Generated with Claude Code
[!NOTE]
Cursor Bugbot is generating a summary for commit 186d503abdc02fcbbb94a65b342bb5d583be8ed1. Configure here.
Summary by cubic
Pins Next.js back to 16.3.5 to restore /flows and /docs pages, which have returned 500 in production since the 16.3.8 upgrade.
With 16.3.8 the OpenNext adapter stops hitting the static-assets cache (every prerendered page answers x-nextjs-cache: MISS), so pages that can't render in the Workers runtime fail at request time. The diff is only the version pin in web/package.json and package-lock.json, reverting to the exact healthy build from 2026-10-01.
- Do not retry the 16.3.8 upgrade until
@opennextjs/cloudflarereads the new prerender cache keys.
Agent Relay sessions
claudesessionfe983435Ā· opened viagh pr createĀ· last active 2026-10-02