Skip to content

No launcher artifact: Pi with memory needs a hand-assembled Bun command every session #611

Not planned

Description

@ocsi-architect

Problem

Working Pi support means the user assembles the Bun launcher by hand, from a README, every time they start Pi. Today the verified sequence is: find the CLI bundle inside the Pi installation, remember to invoke it with Bun rather than the pi shim, use that same invocation for the install commands, and retain the checkout afterwards because a local install is a link.

Assembled on a real machine it looks like this:

PI_CLI="$(npm root -g)/@earendil-works/pi-coding-agent/dist/bundle/cli.js"
bun "$PI_CLI" install .
bun "$PI_CLI"

Four things go wrong with that. It only works for one install layout (npm root -g); it silently breaks when a version bump moves the bundle path; the pi shim still sits on PATH and now fails the session, see #610; and the user has to remember a command that is not the command for the product they installed.

The front page advertises adapters for OpenCode, Pi and oh-my-pi, and OpenCode's equivalent is one line that never needs repeating: opencode plugin add opencode-self-improvement.

Proposal

Ship launcher artifacts from this package, so the runtime requirement is ours to satisfy and not the user's to remember.

  • osi-pi — resolves the Pi CLI bundle across the layouts people actually use (npm root -g, a local project install, pnpm global), then execs bun <cli.js> "$@". When Bun is absent it says so before starting anything, with the install command, rather than letting Pi fail. Keep this file plain Node-compatible JavaScript: it only spawns processes and reads files, so it must not itself need the runtime it is screening for.
  • osi-pi install — registers this package with Pi and prints the launcher path plus a pasteable shell function so pi can keep working in that shell.
  • osi-pi doctor — one screen: Bun version, Node version, resolved Pi CLI and version, whether the package is registered in the user's Pi settings, the memory directory in use and whether OpenCode resolves the same one, whether auto-capture is on, and the row count. The store path and the capture state are the two things people get wrong silently, so they appear even when everything is fine.

The pi.json and OPENCODE_MEMORY_DIR knobs stay as they are; this is about the entry point, not the configuration surface.

Acceptance

From a machine with the package published and nothing else configured, two commands get a memory-enabled Pi session, and osi-pi doctor explains any remaining problem in one line each. Verified on macOS and Linux with the real CLI, with the Windows PowerShell equivalent documented and run once. The doctor's output format is asserted by a test, so the text quoted in the docs cannot drift from the shipped text — the same rule docs/reference/*.md already follows for other claims.

Non-goals

Not a general Pi package manager, and not a replacement for pi install. If #612 decides to make the engine Node-compatible, the launcher stays useful as the doctor and the one-command install, and its Bun check becomes a compatibility note rather than a hard gate.

Activity

  1. added
    enhancement
    severity:high
    on Nov 29, 2026
  2. ocsi-architect commented on Nov 29, 2026

    @ocsi-architect
    Author

    Consolidating into #613: one ocsi binary with install / launch / doctor, rather than osi-pi and osi-omp as separate executables. Two programs with one job would each need their own resolution logic and their own docs, and every added host would add a third.

    Keeping this open as the source of the field list for doctor. Two additions from what has since been observed, recorded in #613: install has to check the runtime before registering (a registration that succeeds and then breaks the host's next launch is worse than refusing), and doctor has to distinguish "no memory tools registered" from "no memories found" — a host without the plugin answers a memory question with a confident none, which is indistinguishable from an empty store.

    Also measured since this was written: omp plugin install . and omp plugin list work verbatim, because oh-my-pi's CLI starts with #!/usr/bin/env bun, and the plugin then reads the shared store with no extra flags. Pi is the only host needing the runtime bridge, so launch is narrow even if the surface is named for all hosts.

  3. abogartz commented on Dec 1, 2026

    @abogartz
    Owner

    Closed as won't fix, on the owner's ruling. A launcher is not the shape this product ships. Host installation goes through each host's own plugin command, and the adapter architecture is what closes the runtime gap these tickets were written to work around.

    We don't need a launcher. That was written before we figureout out how to make adaptors.

    That settles the direction rather than the difficulty: the work is unwanted, not unspecified. If the ruling changes, reopen this — the thread stays put and the next attempt starts from it instead of from zero.

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

    enhancementseverity:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions