orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: WSL OMP agents no longer appear in the worktree sidebar after v1.4.124

Open euclodius opened this issue 4 months ago • 6 comments

Environment

  • Windows 11
  • WSL2 / Ubuntu
  • Orca Desktop v1.4.124
  • Project runtime: WSL
  • Project/worktree path: WSL filesystem via \\wsl.localhost\<Distro>\...
  • Agent: OMP installed inside WSL

Regression

After updating to v1.4.124, OMP agents launched in a WSL worktree no longer appear as agent rows in the left worktree sidebar.

This is a regression from v1.4.123:

  • v1.4.123: OMP appeared as an agent row, but live status stayed inactive/gray.
  • v1.4.124: OMP no longer appears as an agent row at all.

Related older OMP status issue: #7091.

This may also be related to the broader Windows desktop + WSL agent-runtime class of issues, where an agent launched inside WSL is not projected correctly into the Orca desktop agent/sidebar model. A similar Codex-in-WSL sidebar symptom is tracked in #6907.

What still works

The OMP terminals are created and tracked by Orca.

orca-ide terminal list --json shows the OMP panes as live terminals:

{
  "handle": "term_<id>",
  "title": "OMP",
  "connected": true,
  "writable": true,
  "worktreePath": "\\\\wsl.localhost\\<Distro>\\..."
}

The same OMP panes are also present in visualLayouts.

The OMP processes also have the expected Orca-managed environment:

ORCA_OMP_STATUS_EXTENSION=/mnt/c/Users/<user>/.omp/agent/extensions/orca-agent-status.ts
ORCA_PANE_KEY=<tabId>:<leafId>
ORCA_TERMINAL_HANDLE=term_<id>
ORCA_AGENT_LAUNCH_TOKEN=<token>
ORCA_AGENT_HOOK_PORT=<port>
WSLENV=...ORCA_TERMINAL_HANDLE/u:ORCA_PANE_KEY/u:...:ORCA_OMP_STATUS_EXTENSION/p:...

The ORCA_TERMINAL_HANDLE and ORCA_PANE_KEY values inside the OMP process environment match the visible OMP panes returned by orca-ide terminal list --json.

So launch/env injection, terminal creation, and pane identity appear correct.

Expected behavior

OMP sessions launched in a WSL worktree should appear as agent rows in the left worktree sidebar.

Actual behavior

OMP TUI sessions run normally and are visible as terminal tabs, but no OMP agent rows appear in the left worktree sidebar.

Notes

This may be related to v1.4.124 changes around foreground agent detection, OMP/Pi title identity, POSIX process-table parsing, or sidebar agent-row projection.

Potentially related PRs:

  • #7447
  • #7476
  • #7518
  • #7514

euclodius avatar Jul 06 '26 10:07 euclodius

Cross-linking #7563 because it appears to be the same Windows GUI / WSL runtime class of issue, just at an earlier stage of the agent lifecycle.

In #7563, the regular Claude CLI works inside WSL and in Orca-managed WSL terminals, but the GUI agent picker does not detect/show it. In this issue, OMP is already launched in Orca-managed WSL terminals and the Orca env/terminal identity is present, but the worktree sidebar no longer shows the OMP agents after v1.4.124.

So the symptoms differ:

  • #7563: pre-launch GUI agent availability/detection misses a WSL-installed agent.
  • #6907: Codex launches in a WSL worktree but does not appear in the agent sidebar/status surface.
  • This issue: OMP launches in WSL and has Orca identity/env, but no longer appears as a sidebar agent row.
  • #7091: OMP appears to receive Orca status env, but the status extension/live state path does not report correctly.
  • #6965: separate WSL CLI cwd/UNC bridge failure that can make active/current selectors resolve as C:\Windows.

This looks like a useful single test matrix: Windows desktop app, WSL default runtime, agent CLIs installed only inside WSL, Orca-managed WSL terminal launch works, and then verify GUI picker, sidebar row creation, live status, and orchestration delivery.

euclodius avatar Jul 06 '26 10:07 euclodius

Follow-up with a narrower root-cause signal. This now looks like a WSL -> Windows hook transport problem, not an OMP launch-command problem.

Environment:

  • Windows desktop Orca app, v1.4.124.
  • Project/runtime is WSL2 Ubuntu.
  • OMP is installed only inside WSL (omp/16.3.10).
  • OMP was launched from Orca UI as an OMP agent in a WSL worktree.

I tested a custom OMP launch command that explicitly passes Orca's managed status extension:

/home/<user>/.local/bin/omp --extension /mnt/c/Users/<user>/.omp/agent/extensions/orca-agent-status.ts

The running process confirms the extension argument is present:

/home/<user>/.local/bin/omp --extension /mnt/c/Users/<user>/.omp/agent/extensions/orca-agent-status.ts

The OMP process also receives the expected Orca hook env, including:

ORCA_AGENT_HOOK_ENDPOINT=/mnt/c/Users/<user>/AppData/Roaming/orca/agent-hooks/endpoint.cmd
ORCA_AGENT_HOOK_TOKEN=<token>
ORCA_AGENT_HOOK_VERSION=1
ORCA_OMP_STATUS_EXTENSION=/mnt/c/Users/<user>/.omp/agent/extensions/orca-agent-status.ts
ORCA_PANE_KEY=<tab_uuid>:<leaf_uuid>
ORCA_TERMINAL_HANDLE=<term_handle>
ORCA_AGENT_LAUNCH_TOKEN=<launch_token>
ORCA_AGENT_HOOK_ENV=production
ORCA_AGENT_HOOK_PORT=<port>
WSLENV=...ORCA_AGENT_HOOK_PORT/u:ORCA_AGENT_HOOK_TOKEN/u:...ORCA_AGENT_HOOK_ENDPOINT/p:ORCA_OMP_STATUS_EXTENSION/p...

However, posting a synthetic OMP hook event from inside WSL to the injected hook port fails:

curl -sS -o /tmp/orca-hook-smoke.out -w '%{http_code}\n' \
  -X POST "http://127.0.0.1:${ORCA_AGENT_HOOK_PORT}/hook/omp" \
  -H "Content-Type: application/json" \
  -H "X-Orca-Agent-Hook-Token: ${ORCA_AGENT_HOOK_TOKEN}" \
  --data-binary @-

Result:

curl: (7) Failed to connect to 127.0.0.1 port <port>: Couldn't connect to server
000

The exact same payload sent through Windows curl.exe from the same WSL shell succeeds:

/mnt/c/Windows/System32/curl.exe -sS -o NUL -w "%{http_code}\n" \
  -X POST "http://127.0.0.1:${ORCA_AGENT_HOOK_PORT}/hook/omp" \
  -H "Content-Type: application/json" \
  -H "X-Orca-Agent-Hook-Token: ${ORCA_AGENT_HOOK_TOKEN}" \
  --data-binary @-

Result:

204

Immediately after the successful Windows-side curl.exe POST, the OMP agent appeared/updated in the left worktree sidebar.

I also verified separately that the OMP extension file itself can emit hook payloads: running OMP with --extension <orca-agent-status.ts> against a temporary HTTP server inside WSL produced /hook/omp events such as before_agent_start, agent_start, message_end, agent_end, and session_shutdown.

So the current narrowed hypothesis is:

  • Orca's Windows desktop app starts the hook receiver on Windows localhost.
  • WSL-spawned agents receive ORCA_AGENT_HOOK_PORT=<port> and the status extension posts to http://127.0.0.1:<port>/hook/omp.
  • For a process running inside WSL, 127.0.0.1 is the WSL loopback, not the Windows desktop app's loopback listener.
  • Therefore the extension can be loaded and can try to report status, but the hook events never reach Orca unless manually bridged through a Windows-side process such as curl.exe.

This also explains why changing the OMP launch command does not fix the sidebar: the extension and env can be correct while the endpoint remains unreachable from WSL.

Expected invariant for WSL-backed agent terminals: the injected Orca hook endpoint should be reachable from the WSL process that receives it. A regression test could launch OMP in a WSL worktree and then, from inside that same WSL environment, POST a synthetic hook payload to the injected endpoint and assert both 204 and sidebar/status update.

Potential fix directions might be a WSL-local relay, a WSL-reachable host address, or an endpoint bridge that does not require the agent extension to call Windows localhost directly.

Related: #7091, #6907, #7474.

euclodius avatar Jul 06 '26 12:07 euclodius

Follow-up from additional local diagnostics. I now have a working repro/workaround, and it split the OMP failure into two separate requirements.

Environment remained the same:

  • Windows desktop Orca app.
  • Project runtime: WSL2 Ubuntu.
  • OMP installed only inside WSL (omp/16.3.10).
  • OMP launched from Orca's agent picker/combobox in a WSL worktree.

1. The OMP extension has to be loaded explicitly

For a fresh OMP launch from Orca UI, the process env contains the expected Orca values, including:

ORCA_OMP_STATUS_EXTENSION=<Windows-mounted path>/orca-agent-status.ts
ORCA_AGENT_HOOK_PORT=<port>
ORCA_AGENT_HOOK_TOKEN=<token>
ORCA_PANE_KEY=<tab_uuid>:<leaf_uuid>
ORCA_TERMINAL_HANDLE=<term_handle>
ORCA_AGENT_LAUNCH_TOKEN=<launch_token>
ORCA_WORKTREE_ID=<wsl_unc_worktree_id>

But the actual OMP argv from the Orca UI launch is just:

omp

It is not:

omp --extension <orca-agent-status.ts>

In this setup, OMP 16.3.10 does not appear to auto-load the extension just because ORCA_OMP_STATUS_EXTENSION is present. Adding the same extension path to the OMP user config made OMP emit real status hooks:

# ~/.omp/agent/config.yml
extensions:
  - <Windows-mounted path>/orca-agent-status.ts

After that, newly launched OMP agents started producing real /hook/omp events such as:

before_agent_start
agent_start
message_end
agent_end

So ORCA_OMP_STATUS_EXTENSION env injection alone is not sufficient unless Orca also passes --extension or installs/registers that extension through OMP's supported extensions config.

2. The injected endpoint still has to be reachable from WSL

The extension began firing only after config-level loading, but WSL still could not reach Orca's Windows-side hook receiver directly at 127.0.0.1:${ORCA_AGENT_HOOK_PORT}. A small WSL-local diagnostic relay proved this:

  • Listen inside WSL on 127.0.0.1:${ORCA_AGENT_HOOK_PORT}.
  • Forward incoming /hook/* requests to Windows Orca using Windows curl.exe against the same Windows loopback port.

With that relay active and the OMP extension registered in ~/.omp/agent/config.yml, OMP appeared as a native agent in the left worktree sidebar and live status worked.

The relay log showed successful forwards:

hook /hook/omp event=before_agent_start status=204
hook /hook/omp event=agent_start status=204
hook /hook/omp event=message_end status=204
hook /hook/omp event=agent_end status=204

Orca's last-status.json then contained an OMP entry and the sidebar updated correctly.

Current conclusion

For Windows desktop Orca + WSL runtime + WSL-only OMP, there seem to be two distinct things Orca needs to guarantee:

  1. OMP must actually load orca-agent-status.ts (via --extension or OMP's persistent extensions config). Merely exporting ORCA_OMP_STATUS_EXTENSION is not enough in my test.
  2. The hook endpoint injected into the WSL process must be reachable from that WSL process. Windows localhost is not WSL localhost, so a WSL-local relay or WSL-reachable endpoint is needed.

Once both conditions are true, OMP shows up and live status works.

Related: #7091 for the extension-load/config part, #6907 for the same WSL hook transport class with Codex.

euclodius avatar Jul 06 '26 12:07 euclodius

Taking a look!

brennanb2025 avatar Jul 07 '26 22:07 brennanb2025

Thanks again @euclodius for the exceptional diagnosis here — your narrowing was exactly right on both counts (the extension not auto-loading from ORCA_OMP_STATUS_EXTENSION alone, and the WSL→Windows loopback gap), and it directly shaped the fixes.

Two PRs have now merged:

  • #7642 makes Orca-managed WSL shells load the status extension: interactive omp invocations now get --extension <orca-agent-status.ts> automatically (the same wrapper local shells use), so no config.yml registration is needed.
  • #7641 fixes delivery: when the extension's POST to the injected port can't connect (WSL NAT loopback), the event is routed through Windows-side curl.exe, which reaches the loopback listener Orca actually binds. Non-blocking and fail-open.

On the regression itself: the v1.4.123 → v1.4.124 change you spotted was a title-normalization change (#7447) that stopped idle OMP terminals from producing the gray title-derived fallback row. The sidebar is moving to hook-driven rows only, so rather than restoring that fallback, the fix was making hooks actually work from WSL — with the two PRs above, OMP in a WSL worktree now shows a live sidebar row (validated end-to-end on a Windows + WSL2 NAT rig, including the row transitioning working → done).

These will be in the next release. When it ships, could you re-verify on your setup? Two notes for a clean test:

  1. Remove the manual extensions: entry you added to ~/.omp/agent/config.yml — Orca now passes --extension itself, and both together may double-load the extension (duplicate events).
  2. Disable your WSL-local diagnostic relay — a listener on the same port inside WSL would satisfy the extension's primary POST and mask the new bridge path.

The same loopback gap still affects other agents in WSL (e.g. Codex in #6907) — that's tracked separately as a class-wide transport fix.

brennanb2025 avatar Jul 09 '26 00:07 brennanb2025

Confirmed fixed on v1.4.129 in the original Windows + WSL setup.

Retest details:

  • Stopped the local WSL hook proxy workaround.
  • Removed the manual orca-agent-status.ts entry from ~/.omp/agent/config.yml.
  • Closed old OMP processes and launched a fresh OMP agent from Orca UI in a WSL worktree.

Result: OMP now appears in the worktree sidebar, and live status updates are shown correctly without the local workaround.

Thanks again for the quick fix.

euclodius avatar Jul 09 '26 09:07 euclodius