Skip to content

Pi 0.74 package scope rename breaks Pi CLI resolution #557

@zachargt

Description

@zachargt

What happened

After updating Pi to 0.74.0, Pi is installed globally as:

@earendil-works/pi-coding-agent

Taskplane's resolvePiCliPath() still searches only the legacy path:

@mariozechner/pi-coding-agent/dist/cli.js

On a Homebrew/macOS install with only the current Pi package installed, importing the resolver and calling resolvePiCliPath() fails with:

Cannot find Pi CLI entrypoint (@mariozechner/pi-coding-agent/dist/cli.js).
Ensure the pi coding agent is installed globally via 'npm install -g @mariozechner/pi-coding-agent'.
npm root -g returned: /opt/homebrew/lib/node_modules

Expected behavior

Taskplane should locate Pi's CLI when Pi is installed under the current package scope:

@earendil-works/pi-coding-agent/dist/cli.js

while preserving compatibility with older @mariozechner/pi-coding-agent installs.

Root cause

extensions/taskplane/path-resolver.ts builds candidates from a single hardcoded relative path:

join("@mariozechner", "pi-coding-agent", "dist", "cli.js")

Pi 0.74 moved to the @earendil-works/* scope, so that path no longer exists on fresh/current installs.

Suggested fix

Search both package scopes, preferring the current one:

  1. @earendil-works/pi-coding-agent/dist/cli.js
  2. @mariozechner/pi-coding-agent/dist/cli.js

Also consider adding process.argv[1] as the first candidate when it already points at a Pi dist/cli.js, which also helps non-standard installs (similar to #519).

Local validation

A local patch that searches both scopes resolves correctly on my machine:

/opt/homebrew/lib/node_modules/@earendil-works/pi-coding-agent/dist/cli.js

Environment:

pi: 0.74.0
node: 25.6.0
npm root -g: /opt/homebrew/lib/node_modules
taskplane: 0.28.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions