{"record":{"id":"3432fd7b08e0d151","repo":"usestrix/strix","slug":"bubble-tea-tui-binary-not-found-reinstall-strix-f","errorCode":null,"errorMessage":"Bubble Tea TUI binary not found. Reinstall Strix from an official platform wheel.","messagePattern":"Bubble Tea TUI binary not found\\. Reinstall Strix from an official platform wheel\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"strix/interface/tui/runtime.py","lineNumber":321,"sourceCode":"        self.coordinator.mark_shutting_down()\n        scan_task = self.scan_task\n        if scan_task is not None:\n            if not scan_task.done():\n                scan_task.cancel()\n            with contextlib.suppress(asyncio.CancelledError):\n                await scan_task\n\n    @staticmethod\n    def binary_command() -> list[str]:\n        source = tui_source_dir()\n        # A checkout may also contain a stale wheel/build sidecar. Running the\n        # current source is the deterministic development choice.\n        if (source / \"go.mod\").is_file() and shutil.which(\"go\"):\n            return [\"go\", \"run\", \"./cmd/strix-tui\"]\n        packaged = get_strix_resource_path(\"bin\", tui_executable())\n        if packaged.is_file():\n            return [str(packaged)]\n        raise RuntimeError(\n            \"Bubble Tea TUI binary not found. Reinstall Strix from an official platform wheel.\"\n        )\n\n    @staticmethod\n    async def _cancel_tasks(*tasks: asyncio.Task[None] | None) -> None:\n        for task in tasks:\n            if task is None:\n                continue\n            task.cancel()\n            with contextlib.suppress(asyncio.CancelledError):\n                await task\n\n    async def run(self) -> None:\n        # Redirect the process's sys.stdout/sys.stderr while the TUI runs so\n        # logging handlers created during the scan never paint over the Go\n        # TUI's alt screen. The child still inherits the real terminal fds;\n        # only the Python-level bindings change.\n        original_stdout = sys.stdout","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/interface/tui/runtime.py#L303-L339","documentation":"Raised by TuiRuntime.binary_command (runtime.py:321) when it can find neither a Go toolchain to run the TUI from source (tui_source_dir contains go.mod and `go` is on PATH) nor a packaged Bubble Tea binary under the installed wheel's resources (get_strix_resource_path('bin', tui_executable())). It means the current installation is incomplete: a pip/source install that never bundled the Go frontend.","triggerScenarios":"Running the TUI from a pip install built without the Go binary step, or from a source checkout after deleting the Go module or with Go uninstalled, or on a platform with no prebuilt wheel (binary resource missing). tui_executable() names the platform binary that is absent.","commonSituations":"pip install from sdist/PyPI source distribution that lacks the bundled bin; installing on an uncommon platform/arch with no wheel; Go removed from PATH after a source checkout; a venv copied or relocated so resource paths broke.","solutions":["Reinstall from an official platform wheel: pip install --force-reinstall strix-agent (wheel bundles bin/<tui executable>)","For source development: install Go (https://go.dev) and ensure `go` is on PATH so 'go run ./cmd/strix-tui' is used","Verify the resource dir contains bin/<executable> after install; if not, the wheel is wrong for your platform","Check tui_executable() output matches a file in the package's bin directory"],"exampleFix":"# before\npip install strix-agent==x.y.z  # sdist without bundled binary\nstrix  # RuntimeError: Bubble Tea TUI binary not found\n\n# after\npip install --force-reinstall strix-agent==x.y.z \\\n  --only-binary :all:  # enforce platform wheel\nstrix","handlingStrategy":"validation","validationCode":"cmd = None\nsrc = tui_source_dir()\nif (src / \"go.mod\").is_file() and shutil.which(\"go\"):\n    cmd = [\"go\", \"run\", \"./cmd/strix-tui\"]\nelse:\n    packaged = get_strix_resource_path(\"bin\", tui_executable())\n    if packaged.is_file():\n        cmd = [str(packaged)]\nif cmd is None:\n    install_official_wheel_or_go()","typeGuard":"def tui_runtime_available() -> bool:\n    src = tui_source_dir()\n    if (src / \"go.mod\").is_file() and shutil.which(\"go\"):\n        return True\n    return get_strix_resource_path(\"bin\", tui_executable()).is_file()","tryCatchPattern":"try:\n    cmd = TuiRuntime.binary_command()\nexcept RuntimeError as e:\n    if \"binary not found\" in str(e):\n        subprocess.run([sys.executable, \"-m\", \"pip\", \"install\", \"--force-reinstall\", \"--only-binary\", \":all:\", \"strix-agent\"], check=True)\n        cmd = TuiRuntime.binary_command()\n    else:\n        raise","preventionTips":["Install only from official platform wheels (--only-binary :all:)","For source dev, keep Go installed and on PATH","Smoke-test `strix --help` right after install/upgrade to catch missing binaries early"],"tags":["installation","go","tui","packaging"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}