Repository navigation
Description
Operating system: Linux
Orca version: 1.4.188
--- Details ---
Short summary:
"Delete Workspace" from the sidebar context menu silently does nothing. The
confirmation dialog appears, I confirm, the row disappears and then reappears in
under 200ms. The workspace is never removed. The runtime receives no call at
all — there is no worktree.remove span, no git worktree remove, and no state
change in orca-data.json. orca worktree rm --force removes the same worktree
reliably.
Setup
- Orca 1.4.188 AppImage running headless as
orca serveon an Ubuntu 24.04 VPS
(systemd unit,LIBGL_ALWAYS_SOFTWARE=1). - Desktop client on Linux, also 1.4.188, paired to that runtime over HTTPS/WSS
through nginx. - A project with one worktree
feature-xat~/orca/workspaces/<project>/feature-x
(branchfeature-x).
Steps to reproduce
- On a headless
orca servehost, create a workspace (here:feature/x). - In the desktop client, right-click the workspace row → Delete.
- The "Delete Workspace" dialog appears:
"Remove feature/x from git and delete its workspace folder." - Click Delete Workspace.
- The row disappears, then reappears within ~200ms. The workspace is untouched.
Repeating the delete gives the same result every time.
Evidence
I snapshotted orca-data.json and both trace logs immediately before the
attempt and immediately after.
Runtime side (~/.config/orca/logs/main.trace.ndjson on the serve host) — the
log grew by exactly 3 lines, all git.exec:
{"kind":"git","git.subcommand":"status","cwd":"<worktree path>"}
{"kind":"git","git.subcommand":"remote","cwd":"<unrelated project>"}
{"kind":"git","git.subcommand":"remote","cwd":"<unrelated project>"}
No worktree.remove span. No git worktree remove or git worktree prune.
The lone git status in the worktree is consistent with the sidebar simply
re-rendering the row it never removed.
For contrast, a successful removal on this same host does emit spans —
worktree.remove, worktree.remove.trash_rename, worktree.remove.branch_delete.
None of those appear here.
Client side (~/.config/orca/logs/main.trace.ndjson on the desktop) — the log
grew by exactly 2 lines, both 60-second-interval renderer_memory crash
breadcrumbs. Nothing related to the delete. No crash dumps in Crashpad/completed.
Persisted state — worktreeMeta is identical before and after. The entry
survives untouched, with the same instanceId:
"<worktree path>": {"instanceId":"<uuid>","displayName":"feature/x", …}
git worktree list and the directory on disk are likewise unchanged.
Runtime's own view of the workspace — nothing is locked, archived, dirty, or
otherwise blocked:
id: <repo-id>::<worktree path>
instanceId: <uuid>
hostId: local
creatorProvenance: {"kind":"paired-device","deviceId":"<device-id>"}
branch: refs/heads/feature-x
isMainWorktree: false
isArchived: false
No failure toast appeared. The app has a detailed delete-failure toast with
distinct copy for dirty worktrees, unstopped PTYs, missing registration and
orphaned directories, each offering "Force Delete". None of it fired, which is
consistent with the flow never reaching its error path.
Activity
eakmanrq commentedon Aug 24, 2026
Confirming this on a macOS desktop client → Linux headless runtime pairing (OP was Linux → Linux), and I think the scope is wider than the report suggests.
Desktop client: 1.4.188 (macOS). Runtime: Linux AppImage on a remote box, paired over the tailnet, refreshed the same day (I couldn't read its version string out of the AppImage directly).
A create-control makes it unambiguous
I instrumented a clean window: snapshotted line counts of
main.trace.ndjsonon both sides, then did create → delete → delete → CLI-delete on one throwaway workspace, all within ~90 seconds.git worktreecallsworktree add, 4228 msworktree rm --forceThe creation is the part that settles it: it reached the runtime and did 4.2 s of real
git worktree addwork, so the client→runtime channel was demonstrably alive at that moment. The delete attempts that followed, seconds later in the same session, produced not one line in the runtime trace. Thenorca worktree rm --forceon the same workspace removed it cleanly and emitted the expectedworktree.remove/worktree.remove.trash_rename/worktree.remove.branch_deletespans.So the delete is not failing on the runtime and is not being reverted — it is never dispatched.
Slightly worse than the original report
OP saw three
git.execlines per attempt, including agit statusin the worktree (consistent with the sidebar re-rendering the row). I get zero runtime lines — nogit status, nothing at all. Possibly a second failure mode, or thatgit statuswas unrelated polling.Client side, the whole episode added 3 lines to the desktop trace: two
terminal_webgl_diagnosticbreadcrumbs and one 60 srenderer_memorytick. No delete breadcrumb, no IPC span, no error, no crash dump. No failure toast appeared.Not scoped to one project or one worktree root
Reproduced on two different projects on the same runtime:
~/orca/workspaces/<project>/)worktreeBasePathon a separate filesystemBoth fail identically from the UI, both remove fine via CLI. So this isn't specific to a project, a worktree root, or the default-path fallback.
One correction to the evidence in the report
orca-data.jsonstaying byte-identical isn't diagnostic on my host — its md5 was unchanged across a successful UI creation too. Workspace metadata lives inorchestration.dbthere, so that file wouldn't move either way. The trace deltas are the reliable signal.Workaround
orca worktree rm --worktree "id:<repo-id>::<abs-path>" --forceis reliable — 3 for 3 here across both projects. Worth flagging for anyone reaching for it: removal runsgit branch -D(#2927), so confirm the branch is pushed or already merged before using it.LesleyMurfin commentedon Aug 25, 2026
Confirming on a third topology: Windows desktop client 1.4.188 → Linux headless
orca serve1.4.188 (Ubuntu 6.8), paired over WireGuard (ws://10.200.0.1:6768). Delete Workspace from the UI is a silent no-op — no toast, row returns on refresh — whileorca worktree rm --forceagainst the same runtime (_meta.runtimeId: b61dbabd-…) removes the workspace.The renderer builds its selector as
id:<repoId>::<path>(src/renderer/src/runtime/runtime-worktree-selector.ts). Tested each shape against one throwaway workspace on that runtime:So the
id:shape itself is not rejected; it is matched as an exact string with no path normalization, whereaspath:normalizes. Any divergence in the path or repoId the renderer holds yieldsselector_not_found.showandrmmiss identically, so this is notrm-specific.Observation on #16295: it makes this surface as a visible
selector_not_foundinstead ofremove-worktree.tstreating it as a stale local mirror and returningok:true— the selector miss itself is still there.LesleyMurfin commentedon Aug 25, 2026
Bisected the regression, since nobody has named it yet.
id:selector resolution became exact-string-only in b82a879 —perf(runtime): resolve an explicit worktree id without scanning every repo(#14399, 2026-08-14, first release tag containing it:v1.4.186). Before it, anid:selector was matched across the fleet from rows rebuilt as${repo.id}::${gitWorktree.path}; after it,id:is the one selector kind resolved inside a single repo by===, with no normalization and no fallback. Its own comment states the asymmetry: "Why onlyid:: every other selector kind is matched across the whole fleet."path:kept comparing throughnormalizeRuntimePathForComparison.#15013 (STA-4343, 2026-08-17) then routed workspace removal through that scoped resolver (
resolveWorktreeRemovalTarget→resolveScopedWorktreeIdRow), so a scoped miss became a hardselector_not_found. Since the renderer can only address a workspace by id (toRuntimeWorktreeSelectoralways emitsid:<repoId>::<path>), the UI inherited the strict comparison while the CLI'spath:form kept the lenient one — which is whyorca worktree rm --worktree path:… --forcestill works on a workspace the UI cannot delete.That matches the timeline in this thread: all three reports are 1.4.188, and the CLI never regressed.
Relevant prior art for whoever picks this up: #15616 (open) already adds
worktreeIdComparisonKeyinsrc/shared/worktree/id.ts, folding separator and drive-letter spelling throughnormalizeRuntimePathForComparison, and applies it to two other exact-string id checks. A fix here looks like the same comparison key applied to the two remaining sites (resolveWorktreeSelector'sid:branch andresolveScopedWorktreeIdRow), keeping the repo-id half exact and the exact-match fast path first. #11073 (open) is worth respecting alongside it: an unstoppable PTY must still fail a destructive delete closed even when the selector cannot resolve.docs(worktrees): trim the id: selector test header and document the c…
LesleyMurfin commentedon Aug 25, 2026
#16494 is open and addresses one of the two mechanisms in this thread. Deliberately no closing keyword: the other mechanism is untouched and, so far, unreproduced.
What it fixes
The
id:branch ofresolveWorktreeSelector— andresolveScopedWorktreeIdRowbehind removal — compared the selector against the stored row by exact string equality, while thepath:branch a few lines below has always compared throughnormalizeRuntimePathForComparison. Since the renderer can only address a workspace by id (toRuntimeWorktreeSelectoralways emitsid:<repoId>::<path>), any path-spelling divergence between the stored id and whatgit worktree listreports — trailing slash, doubled separator, Windows backslash or drive-letter case, NFC/NFD accent — came backselector_not_found.The silence is the other half of it: the renderer's removal path reads
selector_not_foundas a stale local mirror, callsforgetLocal, and returnsok: true. Nothing is raised, no toast, and the row reappears on the next refresh. The patch runs both id comparison sites through one comparison key, keeping the repo-id half exact and the exact-match fast path first.What the bisect shows
b82a8791f5(#14399, first shipped inv1.4.186) madeid:the only selector kind resolved without a fleet fallback;64de8dd637(#15013, STA-4343) then routed removal through that scoped resolver, turning a scoped miss into a hardselector_not_found. That is what the bisect points at — I make no claim about intent.Before / after
Live A/B on one host, same CLI, real
gitworktrees, only the runtime binary differing (released 1.4.188 vs a runtime built from the branch):rm id:<repoId>::<path>/(trailing slash)selector_not_foundremoved: trueshowof that exact id, after the failedrmok: true— the worktree survived its own deletionrm path:<path>/rm id:<other-repo-id>::<path>What it does not fix
It does not explain the OP's trace or @eakmanrq's instrumented session. The OP saw three extra
git.execlines and noworktree.removespan; @eakmanrq saw a UI create reach the runtime and spend 4.2 s in realgit worktree addwork, while two UI deletes seconds later produced not one runtime trace line, and the CLI then removed the same workspace normally. A selector miss cannot produce that shape, because resolution happens inside the runtime — the call has to arrive first. For those reports the delete appears never to have been dispatched at all, which is a different fix in a different process (the renderer's dispatch path), and I have no reproduction for it. This issue should stay open until that half is accounted for.Caveat on causality
Nobody captured the selector string the original reporters' clients actually sent, so the causal link between this fix and their failures is unproven. The third report above (Windows client against a Linux headless runtime) is the one that captured the asymmetry directly. The OP's and @eakmanrq's traces are the reason we know there are two mechanisms here and not one.
Related
#16295 is complementary rather than overlapping: it makes the miss fail loudly instead of silently, which is orthogonal to making it not miss.
Workaround today
path:selectors were never affected:LuisUrrutia commentedon Aug 26, 2026
I reproduced the previously unaccounted case on
v1.4.188and observed exactly oneworktree.rmdispatch. It failed on theruntime:<environmentId>vs.localhost-ID mismatch before theworktree.removespan was created, so the missing span did not mean the RPC was never sent.Applying only #16039 made the same E2E pass. This mechanism therefore appears fixed by #16039; #16494 covers the separate path-mismatch case.
nwparker commentedon Aug 26, 2026
will confirm
AmethystLiang commentedon Aug 26, 2026
Update: #16039 should fix the paired-runtime deletion failure reported here. It resolves the client/runtime host-ID mismatch that left deleted worktrees reappearing, and has merged to
main.It was not included in v1.4.190. The usual release window for a landed PR is 48–72 hours (outside P0+ fixes), so it is expected in the next daily release cycle.
fix(worktrees): resolve id: worktree selectors by path equivalence (#…
OrcaWin commentedon Aug 27, 2026
Status update — both mechanisms named in this thread are now fixed on
main. Keeping this open for confirmation on the reported topologies; see the caveat at the end.Mechanism A — host-ID mismatch: fixed in #16039 (merged
1a7934c54f)A paired client spelling its host
runtime:<environmentId>against a runtime that spells itlocalfailed insideworktree.rmbefore theworktree.removespan was created. That is why @promix1722's and @eakmanrq's traces showed no span and read as "never dispatched" — as @LuisUrrutia reproduced, exactly oneworktree.rmdid arrive.resolvePairedCallerHostIdnow translates the spelling before the host-qualified read.Mechanism B —
id:selector compared byte-exact: fixed in #16494 (mergedde6fe8b7ea)@LesleyMurfin's bisect was accurate. I reproduced it on
mainbefore merging:resolveScopedWorktreeIdRow(repo-worktree-row-resolution.ts:198) and theid:branch ofresolveWorktreeSelector(orca-runtime.ts:32023) both matched the stored id with===, while thepath:branch fourteen lines below (:32037) has always compared throughnormalizeRuntimePathForComparison. A trailing slash, a doubled separator, or a Windows drive-letter difference each returnedselector_not_found; the exact spelling resolved. Both id sites now run through one comparison key that keeps the repo-id half exact, folds only the path, and tries the exact match first.Ambiguity still fails closed: where two rows spell one directory, the scoped lookup refuses and the fleet selector raises
selector_ambiguousrather than picking a winner. That matters because this resolver gates a destructive delete.Verification before merge: reproduction flipped to passing, 47/48 CI checks green (1 e2e job skipped, no e2e specs touched), full three-project typecheck clean, and the 505-file runtime/worktree/removal suite showed a failure set byte-identical to
mainon the same base — no new failures. No lockfile,package.json, workflow, or native binary touched.The silence is a third thing, and it is still there
Neither fix changes the fact that the renderer reads
selector_not_foundas a stale local mirror, callsforgetLocal, and returnsok: true— no toast, row back on the next refresh. Both fixes remove causes of the miss; none makes a miss loud.#16295 aimed at exactly this and I've closed it — detailed reasoning there. Short version: it keyed on
currentResolution.kind === 'resolved', which at that point inremoveWorktreeis true for essentially every delete (the row hasn't been torn down yet, and the host-qualified branch returnsresolvedfor any parseable host). So it removed theforgetLocalself-heal wholesale and made a genuinely stale row — including one removed via theorca worktree rm --forceworkaround this issue recommends — permanently undeletable from the UI. It broke two shipped tests to that effect. The intent is right and worth redoing against a real liveness signal.Why this stays open
Nobody captured the selector string the original clients actually sent, so the causal link between Mechanism B and @promix1722's and @eakmanrq's specific failures is inferred, not proven. @LesleyMurfin's Windows-client report is the one that demonstrated the asymmetry directly. If those of you who hit this can retest once these land in a build, that would close it properly.
Thanks to everyone who instrumented this — the create-control, the three-topology confirmations, the bisect, and the E2E repro are the reason two distinct mechanisms got separated instead of one guess getting shipped.
fix(worktrees): resolve id: worktree selectors by path equivalence (s…
fix(worktrees): resolve id: worktree selectors by path equivalence (s…