executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
detecting-port-conflictsDetect EADDRINUSE and port conflicts, find what's using the port, and resolve it by killing the process or suggesting an alternative port.
Independent GitHub snapshot · Automated classification · Original documentation governs
When a dev server fails to start because a port is already in use, diagnose and resolve it.
Scan terminal output for these patterns:
EADDRINUSEaddress already in usePort XXXX is already in usebind: address already in useOSError: [Errno 98] Address already in useExtract the port number from the error message.
Find what's using the port:
lsof -i :<PORT> -P -n
This shows the PID, process name, and user. Common culprits:
kill <PID>
# If it doesn't stop:
kill -9 <PID>
Then restart the original server.
Suggest the next available port:
# Check if port+1 is free
lsof -i :<PORT+1> -P -n
Update the dev server config or start command:
next dev -p <PORT>vite --port <PORT>PORT env varpython manage.py runserver <PORT>killall node
Only suggest this if the user confirms — it kills everything.
docker pslsof shows nothing, the port may be in TIME_WAIT state — just wait 30 seconds or use a different port