Repository navigation
Description
What happens
Editor tabs are duplicated in the persisted session on every launch. The same file ends up with many tabs, and the count only grows across relaunches. Untitled notes are the worst case: a phantom untitled.md with no file on disk can't be closed in a way that survives a restart, so it keeps coming back.
On my profile right now, unifiedTabs in profile-state.db holds, for a single entityId each:
docs/TODO.md— 8 tabs (file exists)untitled.mdin one worktree — 5 tabs (0-byte file on disk)untitled.mdin another worktree — 5 tabs (no file on disk at all)- a scratchpad
.md— 4 tabs (no file on disk)
Each duplicate is a distinct unifiedTabs entry with the same entityId and contentType: "editor", a different id form, and an incrementing sortOrder (0, 1, 2, …). They share one groupId.
Repro
- Open a markdown file (or a new untitled note) in a worktree.
- Quit and relaunch Orca (or let any auto-relaunch restart it).
- The tab is restored, but as an additional entry rather than the same one — so after a few relaunches you have several tabs for the one file. For an untitled note with no file on disk, closing it doesn't stick and it returns on the next restore.
Why I think this happens
- On restore, an editor tab is re-added by
entityIdwithout being reconciled against a tab that's already present (or one that was deliberately closed), so each launch appends another copy. Nothing dedupes or evicts, so the entries accumulate without bound. - For an untitled note with
editorAutoSave=false, there's no file to anchor to and no saved content, so it can neither be saved to disk nor closed durably — it just reappears.
I read this from profile-state.db (the settings, workspaceSession documents). I haven't stepped through the tab-restore source, so the exact path is a guess; the observable facts are the duplicate unifiedTabs entries and the resurrection.
Expected
- Restoring a session doesn't duplicate an editor tab that's already there; one
entityIdmaps to one tab per group. - A closed tab stays closed across a relaunch, including an untitled note.
Notes
- Version 1.4.235, macOS 15 (Darwin 25.5.0).
- There's no setting to disable session/tab restore or "reopen tabs on launch" — I went through the ~190 keys in the
settingsdocument and none covers it, so a user can't opt out as a workaround. - Possibly related but distinct: An untitled note kept because something else wrote into it can't be reopened with Cmd+Shift+T #23771 and Closing an untouched untitled note can delete text written into it at the same moment #23772 are about reopening or deleting a single kept untitled note; this is about duplicate restore of any editor tab, untitled or not.
Activity
DaveDev42 commentedon Oct 22, 2026
Found the cause: a desktop republishes editor tabs it only mirrors from a paired host, and editor tab ids embed the runtime environment, so every hop adds a new id for the same file.
DaveDev42 commentedon Nov 9, 2026
Checked my saved sessions on 1.4.254 (macOS and Windows) and there are no duplicate editor tabs anymore. #33259 and #31984 fixed it, thanks! Closing this. If a closed untitled note keeps coming back, I'll open a separate issue for that.