App Variant
Tauri
Operating System & Version
Windows 11 Pro 25H2
Issue Summary
CodeNomad fails to start on Windows with CLI exited early: exit code: 1 when port 9899 falls inside a WinNAT excluded port range, causing listen EACCES instead of binding successfully. The issue is intermittent because the excluded range varies across boots.
Steps to Reproduce
- On Windows with Hyper-V / WSL / Docker enabled (WinNAT active)
- Install CodeNomad 0.18.0 Tauri build
- Launch from desktop shortcut
- Observe: app fails with
CLI exited early: exit code: 1
To confirm: run netsh int ipv4 show excludedportrange protocol=tcp. If the range 9893-9992 appears, both default ports (9898, 9899) are blocked. Setting CLI_HTTPS_PORT=9891 CLI_HTTP_PORT=9892 (outside the range) makes CodeNomad start normally.
Expected Behavior
CodeNomad starts successfully regardless of WinNAT's excluded port range, or at minimum surfaces an actionable error telling the user which port is reserved and how to fix it.
Logs & Screenshots
[INFO] [app] Starting CodeNomad CLI server options={"httpsPort":9898,"httpPort":9899,...} [ERROR] [app] CLI server crashed err=Error: listen EACCES: permission denied 127.0.0.1:9899 at Server.setupListenHandle [as _listen2] (node:net:1918:21) [tauri-cli] cli process exited before ready: Some("CLI exited early: exit code: 1")
Additional Context
Root cause: CodeNomad's default HTTP port (9899) and HTTPS port (9898) can fall within WinNAT's dynamically reserved excluded port range on Windows. Unlike EADDRINUSE, Windows returns EACCES on listen() for excluded ports — the port is system-reserved, not in use.
Workaround: Set user environment variables CLI_HTTPS_PORT=9891 and CLI_HTTP_PORT=9892.
Suggested fixes:
- Move default ports outside typical WinNAT excluded ranges (e.g. below 9000)
- Allow port configuration in
config.yaml for the Tauri desktop app
- Detect
EACCES on listen() and surface an actionable message (e.g. "Port 9899 is reserved by Windows. Try setting CLI_HTTP_PORT or check netsh int ipv4 show excludedportrange")
App Variant
Tauri
Operating System & Version
Windows 11 Pro 25H2
Issue Summary
CodeNomad fails to start on Windows with
CLI exited early: exit code: 1when port 9899 falls inside a WinNAT excluded port range, causinglisten EACCESinstead of binding successfully. The issue is intermittent because the excluded range varies across boots.Steps to Reproduce
CLI exited early: exit code: 1To confirm: run
netsh int ipv4 show excludedportrange protocol=tcp. If the range9893-9992appears, both default ports (9898, 9899) are blocked. SettingCLI_HTTPS_PORT=9891 CLI_HTTP_PORT=9892(outside the range) makes CodeNomad start normally.Expected Behavior
CodeNomad starts successfully regardless of WinNAT's excluded port range, or at minimum surfaces an actionable error telling the user which port is reserved and how to fix it.
Logs & Screenshots
[INFO] [app] Starting CodeNomad CLI server options={"httpsPort":9898,"httpPort":9899,...} [ERROR] [app] CLI server crashed err=Error: listen EACCES: permission denied 127.0.0.1:9899 at Server.setupListenHandle [as _listen2] (node:net:1918:21) [tauri-cli] cli process exited before ready: Some("CLI exited early: exit code: 1")
Additional Context
Root cause: CodeNomad's default HTTP port (9899) and HTTPS port (9898) can fall within WinNAT's dynamically reserved excluded port range on Windows. Unlike
EADDRINUSE, Windows returnsEACCESonlisten()for excluded ports — the port is system-reserved, not in use.Workaround: Set user environment variables
CLI_HTTPS_PORT=9891andCLI_HTTP_PORT=9892.Suggested fixes:
config.yamlfor the Tauri desktop appEACCESonlisten()and surface an actionable message (e.g. "Port 9899 is reserved by Windows. Try setting CLI_HTTP_PORT or checknetsh int ipv4 show excludedportrange")