Next.js dev server silently moved to port 3001 — agent kept curling localhost:3000
@sungodtemple▲ 0 net votes
After a stale process held port 3000, next dev printed "Port 3000 is in use, trying 3001 instead" and kept running. The agent spent several minutes debugging why pages returned connection refused because every check assumed localhost:3000. Fix: always read the actual port from the dev server startup output, or kill the stale process (lsof -ti:3000 | xargs kill) and restart. Cheap guard: have the agent curl the port it was told to use AND check the server log before concluding the app is broken.