Skip to content

[Bug]: Pi extensions installed inside Orca overlay instead of persistent Pi config #3971

Closed

Description

@noname-oni

Operating system: macOS

Orca version: 1.4.35

Details:

Short summary:
When using Pi inside an Orca-managed terminal/session, Orca sets PI_CODING_AGENT_DIR to a per-session overlay directory. As a result, running pi install <extension> appears to succeed, but the extension is installed into Orca’s temporary overlay rather than the user’s persistent ~/.pi/agent config. After the Orca session/terminal is recreated, the installed extension is gone or not loaded as expected.

What happened?
In an Orca-managed terminal, the environment contains values like:

PI_CODING_AGENT_DIR="$HOME/Library/Application Support/orca/pi-agent-overlays/<pty-or-session-id>"
ORCA_PI_CODING_AGENT_DIR="$HOME/Library/Application Support/orca/pi-agent-overlays/<pty-or-session-id>"
ORCA_OMP_CODING_AGENT_DIR="$HOME/Library/Application Support/orca/omp-agent-overlays/<pty-or-session-id>"

Pi correctly respects PI_CODING_AGENT_DIR, so pi install ... writes into the Orca overlay. This creates a conflict between Orca’s injected Pi integration overlay and normal Pi CLI configuration commands.

The overlay includes Orca-managed extensions such as:

orca-prefill.ts
orca-agent-status.ts
orca-titlebar-spinner.ts

Some files in the overlay appear to be symlinked back to the real Pi config, e.g. settings.json, auth.json, and npm, but extensions/ is a real overlay directory. That means extension installs can land in the overlay and behave as if they are session-local.

How can we reproduce it?

  1. Enable Orca agent hooks. In my case:

    orca agent hooks status

    reports:

    {
      "enabled": true
    }
  2. Open an Orca-managed terminal/session.

  3. Check the Pi config environment:

    env | grep -E '^(PI_CODING_AGENT_DIR|ORCA_PI|ORCA_OMP)'
  4. Observe that PI_CODING_AGENT_DIR points to an Orca overlay path, not ~/.pi/agent.

  5. Run:

    pi install <some-extension>
  6. Pi reports the extension as installed, but it is installed relative to Orca’s overlay. After restarting/recreating the Orca terminal/session, the extension is not persistently available from the user’s normal Pi config.

Expected behavior:
Normal Pi CLI management commands like pi install, pi remove, pi update, and possibly pi config should not accidentally mutate an ephemeral Orca overlay unless the user explicitly asks for that.

Possible fixes / workarounds Orca could implement:

  • Do not expose the overlay as PI_CODING_AGENT_DIR for arbitrary shell commands; only set it when launching the Pi TUI itself.
  • Provide a wrapper/shim so pi install, pi remove, pi update, and pi config run against the original source dir, e.g. ~/.pi/agent, while pi interactive sessions use the overlay.
  • In the overlay, make user extension installs persist by linking or forwarding extensions/ entries back to the source config, while still injecting Orca’s own extensions.
  • Expose an ORCA_PI_SOURCE_AGENT_DIR and teach the shell wrapper to restore PI_CODING_AGENT_DIR to the source dir for non-interactive Pi config-management commands.
  • At minimum, detect pi install in an Orca-managed terminal and warn that the install is targeting a temporary Orca overlay.

Current manual workaround:
Run installs with the real Pi config dir explicitly:

PI_CODING_AGENT_DIR="$HOME/.pi/agent" pi install <source>

or unset the Orca overlay environment variables:

env -u PI_CODING_AGENT_DIR \
    -u ORCA_PI_CODING_AGENT_DIR \
    -u ORCA_PI_SOURCE_AGENT_DIR \
    -u ORCA_OMP_CODING_AGENT_DIR \
    -u ORCA_OMP_SOURCE_AGENT_DIR \
    pi install <source>

Then restart the Orca Pi session so Orca rematerializes its overlay from the persistent config.

Anything else that might help:
This looks like an integration conflict rather than a Pi bug: Pi is behaving correctly by respecting PI_CODING_AGENT_DIR, but Orca’s overlay changes the meaning of normal Pi CLI management commands inside Orca terminals.

Activity

  1. added
    size/m
    on Jun 10, 2026
  2. added
    bug
    on Jun 25, 2026
  3. Jinwoo-H commented on Jun 25, 2026

    @Jinwoo-H
    Contributor

    This should be resolved now

  4. added theissue type on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsize/m

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions