fix: restore install after leftover Bun shims on Windows - #735
Merged
Conversation
On bun-only Windows, uninstalling then reinstalling an agent such as Pi could fail because bun left .exe and .bunx shims behind and a missing npm was treated as an unknown install. Treat a missing package manager as unavailable, remove proven leftover Bun Windows shims, and let install continue when only those leftovers remain.
Drswith
marked this pull request as ready for review
September 8, 2026 15:02
13 tasks
Drswith
added a commit
that referenced
this pull request
Sep 8, 2026
Sync accepted agent-uninstall and lifecycle-reconciliation deltas into living specs after #735, and drop the completed change from the working tree. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On bun-only Windows machines, the advertised Pi migration (
quantex uninstall pithenquantex install pi) dead-ended. Bun leaves{name}.exeand{name}.bunxin its global bin afterbun remove -g(oven-sh/bun#11970). Uninstall then reported another copy on PATH, and install fail-closed because a missing npm executable was treated as inconclusive package presence ("npm could not determine whether … is installed").This change unblocks that path without expanding commands or the published SDK:
ENOENT) is provider-unavailable, not inconclusive presence.install.{binary}.exe/{binary}.bunxpair frombun pm bin -g..exe/.bunxpair.Genuine inconclusive probes from an available provider with PATH present stay fail-closed.
Fixes #733.
Linked Artifacts
qtx install pifails with "could not determine the installed state" on bun-only Windows machines #733Validation
bun run memory:checkbun run lintbun run format:checkbun run typecheckbun run test(if behavior changed)bun run openspec:validateLocal results: 2187 passed, 5 skipped; OpenSpec 26/26; project memory check passed.
Test plan for the reported regressions:
ENOENT→ Core observationunavailable, not indeterminate presence/.bun/bin/PATH + preferred bun absent + npm unavailable → observation absent → decideinstallinstall.exe/.bunxpair and preserves changed or sidecar-less filesRelease Intent
Release Summary
BEGIN_COMMIT_OVERRIDE
fix: restore install after leftover Bun shims on Windows
On Windows machines that only have bun, uninstalling then reinstalling an agent such as Pi could fail because bun left .exe and .bunx shims behind and a missing npm was treated as an unknown install. Quantex now removes those proven leftover shims and continues install when npm is not installed.
END_COMMIT_OVERRIDE
Docs Updated
openspec/changes/windows-bun-residual-shim-lifecycle/Scope Check
Closure Check
Notes
Keep this PR draft until the product CI matrix (Ubuntu, Windows, macOS) is green. Do not tag a release in this PR; release-please should consume the user-facing patch override after merge. OpenSpec archive closure waits until this implementation PR merges and the change is archive-eligible.
JSON, aliases, exit codes, state v2, and receipts are unchanged.
--jsondoes not expose engine or route. No YAML,release-core.yml, or protect-main edits. No SDK or command expansion. Issues #734 and #134 were not started.