[BUG] TUI handshake times out (10s) on first "go run" when Go toolchain/module cache is cold
Describe the bug
On an editable install running the TUI from source (go run), the very first launch fails with "Timed out waiting for TUI protocol ready". _HANDSHAKE_TIMEOUT = 10.0 in strix/interface/tui/backend/server.py is too short when Go has to download its own toolchain plus ~20 module dependencies (bubbletea, lipgloss, etc.) before the TUI process can even start responding.
To Reproduce Steps to reproduce the behavior:
- Have a
gobinary older than the version pinned in strix/interface/tui/go.mod, sogo runtriggers an automatic toolchain download (e.g. go1.24.0) - Ensure the Go module cache is cold (no prior
go mod download/go buildin strix/interface/tui) cdto the repo root and runuv run strix --target <any target>- First launch reliably times out during the handshake
Expected behavior The TUI compiles/downloads dependencies and starts within the handshake window, or the timeout accounts for a cold cache on first run.
INTERACTIVE SETUP UNAVAILABLE The interactive interface could not start: Timed out waiting for TUI protocol ready
System Information:
- OS: Ubuntu 24.04 (WSL2 on Windows)
- Strix Version or Commit: 1.5.3 (editable install, TUI via
go runfrom source) - Python Version: 3.12.3
- LLM Used: openrouter/deepseek/deepseek-v4-flash-0731
Additional context Workaround: pre-warm the Go cache once, outside Strix's timeout window:
bash cd strix/interface/tui go mod download go build -o /tmp/strix-tui-check ./cmd/strix-tui
Subsequent go run invocations reuse the cached toolchain/modules and pass the handshake fine.
Suggested fix: extend _HANDSHAKE_TIMEOUT for the first launch specifically (or detect a cold module cache), and/or document in CONTRIBUTING.md that go mod download / make tui-build should run once before the first strix invocation on an editable install.
Hi! @0xallam @jav1er8 , I'd like to work on this issue.
My plan is to investigate the handshake timeout during the first go run on editable installs and implement a fix so cold Go toolchain/module downloads don't cause the TUI startup to fail. I'll also look into whether any contributor documentation should be updated if needed.
If no one is already working on it, could you please assign this issue to me? Thanks!
Hi @superezzdev, are you still working on this? It’s been a couple of months since your comment and I don’t see a PR. If not, I’d like to pick it up. I have a small fix that gives go run a longer handshake timeout while packaged binaries keep the 10 seconds.
Hi @aniyow07 i'm not assigned that's why i was not working on this