Repository navigation
Description
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?
-
Enable Orca agent hooks. In my case:
orca agent hooks status
reports:
{ "enabled": true } -
Open an Orca-managed terminal/session.
-
Check the Pi config environment:
env | grep -E '^(PI_CODING_AGENT_DIR|ORCA_PI|ORCA_OMP)'
-
Observe that
PI_CODING_AGENT_DIRpoints to an Orca overlay path, not~/.pi/agent. -
Run:
pi install <some-extension>
-
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_DIRfor arbitrary shell commands; only set it when launching the Pi TUI itself. - Provide a wrapper/shim so
pi install,pi remove,pi update, andpi configrun against the original source dir, e.g.~/.pi/agent, whilepiinteractive 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_DIRand teach the shell wrapper to restorePI_CODING_AGENT_DIRto the source dir for non-interactive Pi config-management commands. - At minimum, detect
pi installin 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
Jinwoo-H commentedon Jun 25, 2026
This should be resolved now