Skip to content

[BUG] Pi provider on Windows: "Could not determine the pi version: pi --version exited with ENOENT" #5332

Closed

Description

@MayankBansal12

Summary

On Windows, with Pi installed globally through npm, BB cannot load Pi models. The model picker shows "Could not determine the pi version: pi --version exited with ENOENT", although pi --version works in a terminal. Reinstalling or upgrading Pi does not help. There are two causes: BB's version probe cannot run npm's pi.cmd shim, and once that is fixed, launching Pi through the shim breaks the extra stdio pipes BB's Pi extension depends on.

Image

Versions and environment

  • bb 0.45.0 desktop app (originally observed); reproduced from source at f135a001e72942cee9118d2693208ec0725e2f18 with pnpm dev
  • Windows 11 (build 26200)
  • Node 22.23.1, from the official installer (C:\Program Files\nodejs)
  • Pi: @earendil-works/pi-coding-agent 1.1.0, installed with npm install -g
  • npm creates %APPDATA%\npm\pi.cmd and pi.ps1; there is no pi.exe

Steps to reproduce

  1. On Windows, install Node 22 with the official installer.
  2. npm install -g @earendil-works/[email protected]
  3. In PowerShell, confirm: pi --version prints 1.1.0, and where.exe pi lists ...\AppData\Roaming\npm\pi and ...\AppData\Roaming\npm\pi.cmd.
  4. Start bb and run bb provider models pi (or, in the UI: New thread → Select model → Pi tab).

Expected vs actual

Expected: Pi models are listed and Pi threads can start.

Actual (bb provider models pi, and the same text in the model picker):

Could not load models for pi (failed)
Could not determine the pi version: `pi --version` exited with ENOENT. Install @earendil-works/pi-coding-agent 0.84.0 or newer: npm.cmd install -g @earendil-works/pi-coding-agent@latest

With only the version probe fixed (for example, running it through cross-spawn), the catalog and sessions fail next with:

pi exited (code 1, signal null): Error: Failed to load extension "C:\Users\<user>\AppData\Local\Temp\bb-provider-bridge-provider-pi-XXXX\pi\bb-pi-extension.mjs": Failed to load extension: Unsupported fd type: UNKNOWN Hint: Start without extensions using "pi -ne".

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.

opus-5-5 on behalf of mayank

Activity

  1. changed the title [-]Pi provider on Windows: "Could not determine the pi version: `pi --version` exited with ENOENT" when Pi is installed globally with npm[/-] [+][BUG] Pi provider on Windows: "Could not determine the pi version: `pi --version` exited with ENOENT"[/+] on Oct 10, 2026
  2. added theissue type on Oct 10, 2026
  3. added
    providers
    provider-pi
    partial-repro
    on Oct 10, 2026
  4. bb-slop-cop commented on Oct 10, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: High · Effort: Low.
    • Labels: providers, provider-pi, partial-repro.
    • Report: https://get-bb.github.io/reports/issues/5332.html
    • Verdict: PARTIALLY REPRODUCED · root-cause confidence: medium.
    • Finding: The version probe invokes the bare Pi command through execFile, unlike the portable RPC launch path. Native Windows shim resolution and extra-pipe inheritance remain unverified.
    • Evidence: On trusted main, the synthetic shim-only probe returned ENOENT in two clean Linux checkouts; the explicit-Node control passed both times. Eight existing maintenance/install-gate tests passed. The complete reproduction test is embedded in the report.
    • No PR: The native Windows failure was not reproduced, so the strict simple-fix gate was not met.

    AGENT GENERATED

  5. added a commit that references this issue on Oct 12, 2026
    0c6882c
  6. skillet07 commented on Nov 1, 2026

    @skillet07

    Still reproducible on bb 0.48.1 with pi 1.4.0: the version-probe cause is gone (bb updates reports Pi 1.4.0 Up to date on the Windows host), but the second cause — the bridge extension failing with Unsupported fd type: UNKNOWN — blocks both bb provider models pi --machine <windows-host> and Pi thread start. Fresh report with exact commands and output: #6790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partial-reproprovider-piproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions