Fixing a deploy-only flaky Next.js test with Claude Code

From the community · not tested by us

Handed Claude Code a test that only failed after deploy: a Next.js route handler wrote the session cookie after a redirect had already been sent. They worked it in the project terminal, not a chat tab.

Details

Posted by@arya_at1
DateSep 22, 2026
Category🧪 Web dev & testing
Found viaX

Summary written by ToolPassed from the public post. Claims are the poster’s; we haven’t reproduced this.

Tools used, on ToolPassed

◇Claude CodeAgent
Sponsors