You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"upgrade pi and packages" button trow error when pi already exist #15
I can reproduce a more severe variant of the same root problem on Windows/NVM: the upgrade action can replace a working Earendil PI installation and make installed extensions crash on the next startup.
Reproduction
Run a working installation based on @earendil-works/pi-coding-agent with pi-xai-oauth enabled.
Use Upgrade Pi and Packages in pi-vscode 0.0.9.
Reload VS Code.
PI fails while loading pi-xai-oauth, with a missing-module path ending in @earendil-works/pi-ai/dist/index.js/compat.
This does not upgrade the package that owns the resolved binary when the user installed the maintained Earendil fork. It replaces/mixes package families before pi update loads installed packages.
The failure is not caused by compat.js being absent from current Earendil PI:
@earendil-works/pi-ai@0.80.10 contains dist/compat.js and exports ./compat.
@earendil-works/pi-coding-agent@0.80.10 aliases @earendil-works/pi-ai/compat in its extension loader.
pi-xai-oauth@1.3.6 declares peers >=0.80.1 <0.81.0 and its official loader check passes against exact PI 0.80.10 on Node 22.19.0.
The mixed loader/package family causes the @earendil-works/pi-ai/compat subpath to be resolved incorrectly, producing the observed startup crash before package update/recovery can complete.
Expected behavior
The extension should discover the package that actually owns the resolved pi binary and upgrade that same package. At minimum, it should show the package name before confirmation and refuse to replace a different distribution/fork.
A robust approach would be:
Resolve the real pi path.
Find its owning package.json and read name/version.
Upgrade that exact package with the inferred package manager.
Run pi update only after the CLI upgrade succeeds.
Never hardcode a different package family.
I also verified the recovery approach in a local installer without publishing private repository details.
One additional environment note: current Earendil PI 0.80.10 declares Node >=22.19.0; the affected Windows report used Node 22.12.0, which should also be upgraded, although it does not explain the hardcoded package replacement.
Activity
napa3um commentedon Jun 3, 2026
and why does the button try to install @mariozechner/pi-coding-agent and not @earendil-works/pi-coding-agent? 🤔
napa3um commentedon Jun 3, 2026
Hmenez3s commentedon Jul 18, 2026
I can reproduce a more severe variant of the same root problem on Windows/NVM: the upgrade action can replace a working Earendil PI installation and make installed extensions crash on the next startup.
Reproduction
@earendil-works/pi-coding-agentwithpi-xai-oauthenabled.pi-vscode0.0.9.pi-xai-oauth, with a missing-module path ending in@earendil-works/pi-ai/dist/index.js/compat.Root cause
src/upgrade.tshardcodes:Therefore the action runs approximately:
This does not upgrade the package that owns the resolved binary when the user installed the maintained Earendil fork. It replaces/mixes package families before
pi updateloads installed packages.The failure is not caused by
compat.jsbeing absent from current Earendil PI:@earendil-works/pi-ai@0.80.10containsdist/compat.jsand exports./compat.@earendil-works/pi-coding-agent@0.80.10aliases@earendil-works/pi-ai/compatin its extension loader.pi-xai-oauth@1.3.6declares peers>=0.80.1 <0.81.0and its official loader check passes against exact PI0.80.10on Node22.19.0.The mixed loader/package family causes the
@earendil-works/pi-ai/compatsubpath to be resolved incorrectly, producing the observed startup crash before package update/recovery can complete.Expected behavior
The extension should discover the package that actually owns the resolved
pibinary and upgrade that same package. At minimum, it should show the package name before confirmation and refuse to replace a different distribution/fork.A robust approach would be:
pipath.package.jsonand readname/version.pi updateonly after the CLI upgrade succeeds.I also verified the recovery approach in a local installer without publishing private repository details.
One additional environment note: current Earendil PI
0.80.10declares Node>=22.19.0; the affected Windows report used Node22.12.0, which should also be upgraded, although it does not explain the hardcoded package replacement.