Repository navigation
Description
Operating system
macOS
Orca version
v1.4.188
Details
Short summary
Sending a Markdown review note to a live agent terminal on a paired runtime fails with:
The selected terminal is no longer available.
The note is saved, the paired runtime is reachable, and the selected terminal remains connected and writable. Delivery fails because the renderer-side mirrored tab ID (web-terminal-...) is compared directly with the host/native tab ID returned by terminal.list.
Steps to reproduce
- Pair a second Orca runtime.
- Open a Git repository/worktree hosted by that paired runtime.
- Start an agent terminal in the remote worktree.
- Open a Markdown file in the main editor and add a review note.
- Choose Send notes to an agent and select the live remote agent.
- Observe the error toast.
Expected behavior
The review note is delivered to the selected live agent terminal.
Actual behavior
Orca reports The selected terminal is no longer available. even though the selected terminal is still present, connected, and writable. The note remains saved and is not marked as delivered.
Confirmed cause on current main
The note target keeps the renderer tab ID. For paired-runtime mirrored surfaces, that ID is prefixed with web-terminal-.
findActiveRuntimeTerminal() in src/renderer/src/lib/active-agent-note-target.ts currently matches the runtime inventory with:
terminal.tabId === noteTarget.tabId && terminal.leafId === noteTarget.leafIdHowever, terminal.list on the paired runtime returns the host/native tab ID without the web-terminal- prefix. The strict comparison therefore returns no active terminal and maps to the user-visible no-active-terminal toast.
src/shared/terminal-surface-id.ts already provides toHostSessionTabId() for this conversion, and other paired-runtime terminal paths use it, but this note-delivery lookup does not.
Suggested fix
Normalize the renderer tab ID before comparing it with runtime inventory:
const hostTabId = toHostSessionTabId(noteTarget.tabId)
terminal.tabId === hostTabId && terminal.leafId === noteTarget.leafIdPlease also add a regression test where the explicit note target uses web-terminal-tab-1, while terminal.list returns tab-1 with the same leaf ID, and assert that the live terminal is selected.
Environment
- macOS client with a paired macOS runtime
- Orca 1.4.188 on both sides
- Still present on official
mainat95633a78834ce6182a503a079aeafe7e15feba8b(checked 2026-08-24)
Related issue
#11191 shows the same toast after a host runtime restart leaves stale terminal handles. This is a different failure path: there was no host restart, the current terminal inventory was healthy, and the lookup failed deterministically because the renderer and host tab IDs use different namespaces.
No screenshot is attached because the original UI capture contains private local workspace names and paths.
Activity
moltar commentedon Aug 31, 2026
Still present on v1.4.193. It also hits a headless
orca serveruntime, not only a paired desktop.My setup is a macOS desktop client on v1.4.193 and a remote runtime on v1.4.190 that runs
orca serveon an EC2 host. Notes added on a diff or on a file never reach an agent that runs in a remote worktree. Every send fails, so the feature is unusable against that runtime.I read the same cause out of the shipped 1.4.193 bundle.
findActiveRuntimeTerminalstill compares the renderer tab id against the tab id thatterminal.listpublishes:Here are the two ids from my machine, with the workspace paths removed:
terminal.liston the remote runtime4a9c2e77-...1faeda41-...orca-data.json, underacknowledgedAgentsByPaneKeyweb-terminal-4a9c2e77-...1faeda41-...The leaf ids agree. Only the tab id carries the
web-terminal-prefix, so the lookup finds nothing and the status maps tono-active-terminal.Two causes I ruled out, in case they come up in triage:
terminal.liststill resolved throughterminal.showon the same remote runtime, and the runtime reportedrendererGraphEpoch: 1throughout. This is a different failure from [Bug]: Client keeps stale terminal handles after host runtime restarts, so every send fails with "terminal is no longer available" #11191.#16231 carries the fix and has waited a week with no review. Can someone pick it up?
nwparker commentedon Oct 5, 2026
Closing as resolved on current main. The note-delivery lookup now converts the mirrored renderer tab ID to its host tab ID before matching the leaf, so
web-terminal-tab-9correctly finds hosttab-9. The existing positive delivery regression for this exact namespace mismatch passes.Verified in the current lookup and its delivery regression.