You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Flickering/Broken file tabs in workspace, unable to close/delete #21189
This bug where file tabs (not terminal/agent tabs) in a workspace are unable to be closed and starts flickering around is extremely annoying and sometimes makes the whole workspace unusable. Please see the attached video of the tab bar flickering, and the screenshot is of one of the filetabs. I have not succeeded in closing these down even after restarting Orca or refreshing because as soon as i close a tab through UI or cmd+w it reopens again.
I suspect what might be happening is a state-sync loop: when you close the tab (closeFile), Orca’s host or store state might be immediately re-mirroring it back into openFiles. Because it's bouncing between closed and open every few milliseconds, React gets stuck in a rapid re-render loop. Since it persists across restarts, the ghost tabs are likely already committed to Orca’s session cache on disk.
Curious if clearing the cached open files from your settings file unbricks it:
Quit Orca completely (Cmd + Q).
Make a backup and inspect: ~/Library/Application Support/Orca/orca-data.json
Under "openFilesByWorktree", find your workspace ID and set its array to empty:
"openFilesByWorktree": {
"<workspace-id>": []
}
4. Save and relaunch: does the tab bar stabilize?
───────────────────────────────────────────────────────────────
💡 Automating this with an Agent:
We actually just put together a lightweight diagnostic skill (orca-diagnostics) designed to let your agent troubleshoot and self-heal these exact issues (reading main.trace.ndjson, auditing
sockets, and safely cleaning corrupted orca-data.json cache offline).
If you want your agent to handle this for you, ask it:
▏ "Use the orca-diagnostics skill to quit Orca, inspect ~/Library/Application Support/Orca/orca-data.json, clear any stuck entries under openFilesByWorktree for this workspace, validate the
▏ JSON, and relaunch."
(Also curious: is this a local workspace or connected over SSH? That might help narrow down which side is triggering the re-mirror).
Anton Eriksson thanks for testing that skill. My agent got a little excited and was able to reproduce the bug and then jumped off and built a fix. #21277
We investigated this issue and opened PR #21277 (#21277) with a comprehensive fix.
Root Cause
When tabs reference already-removed worktrees/selectors, attempting to close them returned a selector_not_found error from the host RPC. Because this was treated as an unexpected error rather than an idempotent cleanup, the client reconciler dropped the close intent tombstone and immediately resurrected the ghost tab, causing the rapid flicker / loop observed when repeatedly attempting to close it.
Catches selector_not_found when closing missing selectors/worktrees and returns { closed: true, notFound: true } idempotently rather than failing the call.
hostHasNoSuchTab now properly recognizes missing target errors and retains durable tombstones, preventing phantom tab resurrection during reconciliation.
Verification
Vitest Suite: 47/47 vitest tests pass across the tab lifecycle test suites (packages/host/test/tabs.test.ts, packages/app/test/tab-reconciler.test.ts, and related specs).
Reproduction & Simulation: Standalone repro script verified both reproduction of the flicker loop against the old behavior and clean dismissal without resurrection under the fix.
Full Build: Full production build (pnpm build) completed successfully.
Re-audited after the Discord auto-archive recovery. Closing as fixed on current main: Merged #21277 retains missing-target close intents durably across the normal TTL when the host returns selector_not_found, preventing the exact ghost file-tab resurrection/flicker; regression test covers this and maintainer subsequently confirmed fixed.
Correction after independent review against current main: reopening. My previous closure overstated #21277. The shipped renderer keeps close suppression durable for tab_not_found/terminal_tab_not_found, but explicitly treats selector_not_found as transient and clears the close intent. Its regression test also expects selector_not_found to fail without durable suppression. This report specifically diagnoses a deleted-worktree selector_not_found, so that narrower merged change is not sufficient evidence the reported flicker is fixed.
Final code-path check confirms this is fixed on main, with a correction to my earlier explanation. #21277's production tab list/close paths use explicit worktree IDs, so closing an orphaned file tab bypasses worktree lookup even after that worktree disappears. A definitive missing-tab response also keeps the closed tab suppressed across later snapshots.
selector_not_found itself is intentionally temporary; my original claim that it was durably suppressed was incorrect. I reopened while checking this distinction, and am closing again based on the verified explicit-ID close path.
Activity
orca-discord-issues commentedon Sep 17, 2026
via DiscordThis persists on 1.4.205
orca-discord-issues commentedon Sep 17, 2026
via DiscordI suspect what might be happening is a state-sync loop: when you close the tab (
closeFile), Orca’s host or store state might be immediately re-mirroring it back intoopenFiles. Because it's bouncing between closed and open every few milliseconds, React gets stuck in a rapid re-render loop. Since it persists across restarts, the ghost tabs are likely already committed to Orca’s session cache on disk.Curious if clearing the cached open files from your settings file unbricks it:
Cmd + Q).~/Library/Application Support/Orca/orca-data.json"openFilesByWorktree", find your workspace ID and set its array to empty:orca-discord-issues commentedon Sep 17, 2026
via DiscordThe bug appears locally but i do share it over tailscale to my laptop.
AI Diagnosis after using your skill above
High-confidence Orca bug in remote-session tab reconciliation, still present in 1.4.205:
selector_not_found.
displays selector_not_found.
Evidence
AmethystLiang commentedon Sep 17, 2026
thanks for reporting. looking into it
orca-discord-issues commentedon Sep 17, 2026
via DiscordAnton Erikssonthanks for testing that skill. My agent got a little excited and was able to reproduce the bug and then jumped off and built a fix. #21277LesleyMurfin commentedon Sep 17, 2026
We investigated this issue and opened PR #21277 (#21277) with a comprehensive fix.
Root Cause
When tabs reference already-removed worktrees/selectors, attempting to close them returned a
selector_not_founderror from the host RPC. Because this was treated as an unexpected error rather than an idempotent cleanup, the client reconciler dropped the close intent tombstone and immediately resurrected the ghost tab, causing the rapid flicker / loop observed when repeatedly attempting to close it.Fix Details
session.tabs.close&session.tabs.closeLifecycle):selector_not_foundwhen closing missing selectors/worktrees and returns{ closed: true, notFound: true }idempotently rather than failing the call.tab_not_founderror propagation to keep renderer [Bug]: Phantom remote-closed terminal pane cannot be dismissed (banner mixes EN + "如果这种情况持续存在,请 提交议题.") #9194 durable tombstones intact.hostHasNoSuchTabnow properly recognizes missing target errors and retains durable tombstones, preventing phantom tab resurrection during reconciliation.Verification
packages/host/test/tabs.test.ts,packages/app/test/tab-reconciler.test.ts, and related specs).pnpm build) completed successfully.orca-discord-issues commentedon Sep 18, 2026
via Discordnwparkeris looking into it9 remaining items
fix(runtime): keep absent session tab close intents durable (#21189) (#…
fix(runtime): keep absent session tab close intents durable (stablyai…
orca-discord-issues commentedon Sep 21, 2026
via Discordthis should be fixed btw
nwparker commentedon Oct 7, 2026
Re-audited after the Discord auto-archive recovery. Closing as fixed on current
main: Merged #21277 retains missing-target close intents durably across the normal TTL when the host returns selector_not_found, preventing the exact ghost file-tab resurrection/flicker; regression test covers this and maintainer subsequently confirmed fixed.Evidence: #21277, https://github.com/stablyai/orca/blob/acea59c6d874dbb2ffdce98f4e34a2e649b82a83/src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts, https://github.com/stablyai/orca/blob/acea59c6d874dbb2ffdce98f4e34a2e649b82a83/src/renderer/src/runtime/web-runtime-session-tab-activate-close.test.ts.
If the same problem persists on a build containing this change, please reply with the version and reproduction steps so we can reopen it.
nwparker commentedon Oct 7, 2026
Correction after independent review against current main: reopening. My previous closure overstated #21277. The shipped renderer keeps close suppression durable for tab_not_found/terminal_tab_not_found, but explicitly treats selector_not_found as transient and clears the close intent. Its regression test also expects selector_not_found to fail without durable suppression. This report specifically diagnoses a deleted-worktree selector_not_found, so that narrower merged change is not sufficient evidence the reported flicker is fixed.
Current code:
orca/src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts
Lines 164 to 183 in acea59c
Current regression:
orca/src/renderer/src/runtime/web-runtime-session-tab-activate-close.test.ts
Lines 291 to 337 in acea59c
A current-build reproduction or a complete missing-worktree cleanup fix is still needed before closing.
nwparker commentedon Oct 7, 2026
Final code-path check confirms this is fixed on main, with a correction to my earlier explanation. #21277's production tab list/close paths use explicit worktree IDs, so closing an orphaned file tab bypasses worktree lookup even after that worktree disappears. A definitive missing-tab response also keeps the closed tab suppressed across later snapshots.
selector_not_founditself is intentionally temporary; my original claim that it was durably suppressed was incorrect. I reopened while checking this distinction, and am closing again based on the verified explicit-ID close path.Final merged change, current close implementation, and close/suppression coverage. Please reopen with the version and steps if orphaned file tabs still cannot be closed on a current build.