docs: preserve Next.js development state by aurorascharff · Pull Request #98276 · vercel/next.js · GitHub
Skip to content

docs: preserve Next.js development state - #98276

Draft
aurorascharff wants to merge 1 commit into
canaryfrom
codex/preserve-next-build-cache
Draft

docs: preserve Next.js development state#98276
aurorascharff wants to merge 1 commit into
canaryfrom
codex/preserve-next-build-cache

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Explain that .next contains the development server metadata and incremental compilation caches used across edits and reloads. Resetting it should be a recovery step for corrupt or incompatible generated output, not routine troubleshooting.

Add the same guidance to the next-dev-loop Skill so agents preserve useful Next.js development state while diagnosing source problems.

Add an agentic regression eval that first populates .next from two working development routes, then introduces an invalid generateStaticParams signature. The resulting production error points into .next/types, but deleting .next only regenerates the same error. The eval checks that the agent fixes the source problem, preserves .next, verifies both routes in development, and completes a production build.

Eval results

Model Variant Result Source fix Preserve .next Runtime verification
Sonnet 4.6 Baseline 3/3 Pass Pass Pass
Sonnet 4.6 Bundled Guide 3/3 Pass Pass Pass
Sonnet 4.6 next-dev-loop Skill 3/3 Pass Pass Pass
Haiku 4.5 Baseline 3/3 Pass Pass Pass

The eval covers a behavior observed in real agent sessions. These samples all preserved .next, so the results are regression coverage rather than evidence of lift from the Guide or Skill. Reusing the same development server process is not part of the score.

Verification

  • pnpm build-all
  • pnpm --filter=next build
  • pnpm --dir evals/evals/agent-055-stale-build-error build
  • Sonnet 4.6 eval: baseline, bundled Guide, and next-dev-loop Skill
  • Haiku 4.5 eval: baseline
  • Prettier and ESLint checks

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@aurorascharff
aurorascharff force-pushed the codex/preserve-next-build-cache branch from 860676d to 765017c Compare September 4, 2026 20:49
@aurorascharff aurorascharff changed the title test: preserve Next.js incremental build state docs: preserve .next during agent development loops Sep 4, 2026
@aurorascharff
aurorascharff force-pushed the codex/preserve-next-build-cache branch 5 times, most recently from 47118dd to 720dac4 Compare September 5, 2026 08:16
@aurorascharff aurorascharff changed the title docs: preserve .next during agent development loops docs: preserve Next.js development state Sep 5, 2026
@aurorascharff
aurorascharff force-pushed the codex/preserve-next-build-cache branch 3 times, most recently from 89fa078 to c2de1fb Compare September 5, 2026 09:09
@aurorascharff
aurorascharff force-pushed the codex/preserve-next-build-cache branch from c2de1fb to 2679b08 Compare September 5, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant