Repository navigation
Description
Where were you using Orca?
Desktop only
Operating system
Windows
Orca version
v1.4.261
Details
Summary
Pi native chat never installs Orca's managed Pi extensions into the agent directory that chat launches Pi with. PR #42448 added subagent reporting to orca-agent-status.ts and to the RPC adapter, but the chat launch path installs no extension files at all, so subagent rows cannot appear unless the user already has a current copy sitting in the right directory.
Why
piRpcLaunchPart→resolvePiRpcInvocation(src/main/pi/rpc/launch/rpc-launch-resolution.ts:140-166) sets onlyenv.PI_CODING_AGENT_DIR = deps.accountDir(line 159). Nothing is written to disk.- The chat command is
pi --mode rpc --extension <userData>/pi-native-chat/orca-background-work.ts(src/main/pi/rpc/launch/rpc-launch.ts:112-117). The background-work bridge is the only injected extension. installManagedExtensions(src/main/pi/managed-extensions/titlebar-extension-service.ts:122) is the only writer oforca-agent-status.ts,orca-titlebar-spinner.tsandorca-prefill.ts. Its only caller isbuildPtyEnv(same file, declared line 167, called line 201), and the only Pi caller ofbuildPtyEnvis the PTY env assembly atsrc/main/ipc/pty/host-env/assembly.ts:180. A repo-wide search forinstallManagedExtensionsreturns that single file.
So orca-agent-status.ts gets installed for a terminal-launched Pi and is absent for a chat-launched Pi. #42448's subagent rows depend on that file.
Reproduction
- Orca 1.4.261 on Windows 11, Pi configured, agent status hooks enabled.
- Do not spawn a Pi terminal. Open a Pi native chat and ask it to run a subagent.
- No subagent row appears.
extensionsunder the directory the chat process runs with (PI_CODING_AGENT_DIR, verified here asC:\Users\Administrator\.pi\agent) contains none of Orca's managed files;orca-agent-status.tsis missing entirely. - Copy a current
orca-agent-status.tsinto that directory, restart the chat, repeat: the extension loads and reports.
Same root cause, second symptom: upgrading leaves the on-disk copy stale
Because the file is written only from the PTY path, upgrading Orca does not refresh it:
resources/app.asarafter the 1.4.261 update: mtime 2026-11-16 18:26, contains the post-feat(pi): show subagents in Pi native chat #42448 source (grep findsorca-subagentsandORCA_STRUCTURED_SESSIONin it).C:\Users\Administrator\.pi-orca\agent\extensions\orca-agent-status.tsbefore any Pi terminal had been spawned: 43953 bytes, mtime 2026-11-15 21:54, noorca-subagents, noORCA_STRUCTURED_SESSION.orca agent launch --agent pi --surface terminalrewrote it to 45305 bytes, and both markers appeared.
On this machine the terminal account home (~\.pi-orca\agent) and the directory chat runs with (~\.pi\agent) differ, so even that rewrite does not reach the chat process. writeManagedExtension (line 85) already skips identical content, so refreshing on every launch costs nothing.
Expected
After upgrading Orca, Pi native chat reports subagent activity without manual file copying, the same way terminal-launched Pi does.
Suggested fix
Install the managed extensions for deps.accountDir inside the RPC launch path, for example a ptyId-free overload of installManagedExtensions called from resolvePiRpcInvocation before the version probe. Alternatively run one install pass over every configured Pi account directory at app startup, so an upgrade converges without a terminal spawn.
Workaround
Spawn any Pi terminal once so Orca rewrites the extension, then copy it into the directory chat uses:
Copy-Item "$env:USERPROFILE\.pi-orca\agent\extensions\orca-agent-status.ts" "$env:USERPROFILE\.pi\agent\extensions\"The two paths are the terminal account home and the chat agent dir on this machine; on other installs take them from buildPtyEnv's target and the PI_CODING_AGENT_DIR the chat process was started with.
Activity
fix(pi): install Orca's managed Pi extensions on native chat launch (s…