Link to the code that reproduces this issue
https://github.com/emonty/next.js
To Reproduce
Run npx @next/codemod agents-md --output AGENTS.md
Inspect the instruction added to AGENTS.md. Execute that command in a clean checkout as-if you are an agent in a sandbox:
npx @next/codemod agents-md --output AGENTS.md
Current vs. Expected behavior
I expect the agent being given the instruction to be able to re-run the instruction successfully.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #12-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 9 20:46:52 UTC 2026
Available memory (MB): 31021
Available CPU cores: 22
Binaries:
Node: 24.12.0
npm: 11.6.2
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 16.1.6 // Latest available version is detected (16.1.6).
eslint-config-next: N/A
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Next.js Config:
output: standalone
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
Link to the code that reproduces this issue
https://github.com/emonty/next.js
To Reproduce
Run
npx @next/codemod agents-md --output AGENTS.mdInspect the instruction added to AGENTS.md. Execute that command in a clean checkout as-if you are an agent in a sandbox:
npx @next/codemod agents-md --output AGENTS.mdCurrent vs. Expected behavior
I expect the agent being given the instruction to be able to re-run the instruction successfully.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #12-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 9 20:46:52 UTC 2026 Available memory (MB): 31021 Available CPU cores: 22 Binaries: Node: 24.12.0 npm: 11.6.2 Yarn: N/A pnpm: N/A Relevant Packages: next: 16.1.6 // Latest available version is detected (16.1.6). eslint-config-next: N/A react: 19.2.4 react-dom: 19.2.4 typescript: 5.9.3 Next.js Config: output: standaloneWhich area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response