# Deployment Cleanup

Before launching any app (Electrobun, Tauri, GPUI, Dioxus), always kill previous instances first.

## Rules

- Before `electrobun dev` or any app launch: `pkill -f "launcher\|AgentOrchestrator\|agor-ptyd" 2>/dev/null; sleep 1`
- Before `npm run tauri dev`: kill existing tauri processes
- Before launching GPUI/Dioxus prototypes: `pkill -f "agor-gpui\|agor-dioxus" 2>/dev/null`
- Check for port conflicts: verify the target port is free before binding
- Never leave orphaned daemon processes (agor-ptyd) running after testing
- When rebuilding: kill → build → launch (in that order, never launch before kill)
