Zed stopped restoring sessions after an update
Summary
Zed stopped restoring sessions after an update
Steps to trigger the problem:
- Open Zed
- Open some tabs, maybe some new, some file-backed
- Close the program with cmd-Q
- Open it again
Actual Behavior: Zed starts with a single empty tab
Expected Behavior: Zed would restore the session I had when closing the program
Zed Version and System Specs
Zed: v0.173.10 (Zed) OS: macOS 15.1.1 Memory: 64 GiB Architecture: aarch64
Hey @golddranks - sorry about this, that doesn't feel like a good experience. I wonder if the local SQLite db somehow was corrupted. Can you move the 0-stable database directory located at ~/Library/Application Support/Zed/db to another location (for backup) and restart Zed and see if the issue resolves or persists?
Hi, I renamed 0-stable as 0-stable.old. A new 0-stable was created on startup, and Zed show a "first time" startup screen.
However, the issue persists.
Just to be sure, Zed is supposed to restore the last session with default settings, isn't it? (It used to do this, at least.)
I am also experiencing this. I would love to know if you find a solution.
We have a setting called restore_on_startup is that by any change set on "none"? What happens if you actually set this to "last_session"?
@beniaminzagan
I apologize for my late reply. This solved my issue, but I cannot speak for @golddranks.
My reason for commenting was because I had previously set this setting to "last_session" and was confused by the change in functionality.
Thank you for your help.
I'm taking a week off right now, but I'll come back to this next week! Thanks for your kind support!
Of course! Enjoy your time away.
Make sure to shut your notifications off. 😄
hey, i just installed Zed for the first time (on Windows 11, via Scoop) and have had the same issue since installing.
even after finding the restore_on_startup option and explicitly setting it (tried both last_session and last_workspace) and the issue is persisting.
wasn't sure if it was just due to not being officially supported on Windows yet, but if others are experiencing it too, just wanted to add my two cents from the Windows side.
EDIT: just realized i should add - Zed does at least restore with the last worked on project folder being open in the editor, but none of my previously opened tabs are restored.
#25870 should fix this for Windows. @golddranks If the issue persists on your end, we could reopen this issue.
I'm facing the same issue on macOS even with "restore_on_startup": "last_session" explicitly added in settings.json.
Zed v0.176.1
Have the latest now 0.182.11 and having the same issue (on Ubuntu Linux).
About the restore_on_startup setting, it's not clear what is the difference between last_workspace and last_session, workspace doesn't seem to be a thing anymore, I don't see any option in the menu to create or manage workspaces, if I open the palette and execute workspace: save nothing seems to be happened. What's the point of having workspaces if when saving it I cannot even provide a name to it, are workspaces still supported?
Can confirm, on macOS. This is an incredibly annoying—and workflow-disruptive—regression.
Same issue macos, and remain unclear what the solution is?
It seems that this bugs comes and goes for different people. For me, it fortunately stopped reproducing, but without apparent fix/reason why it would have been resolved.
If the reason is not apparent for developers and users, maybe there could be better logs/debugging to get to the root of it?
I've created more than a dozen different projects, added several different folders to each—basically set everything up nicely—but when closing Zed, it just FORGOT ALL MY PROJECTS. It's silly to rely on some mythical internal algorithms for storing projects. Please implement a proper settings system using project files, like in VS Code, so that I can at least perform backups instead of wasting 10 minutes every day recreating my project hierarchy. Right now, Zed is simply unusable(
I have the same problem unfortunately – I'm running 0.190.5 on macOS Sequoia 15.5.
I had an untitled buffer in Zed where I kept some very important notes, it grew rather large and I just fell victim to this bug. The entire buffer with my notes is gone. This had never happened to me before with Sublime Text or VSCode, and with the former those buffers were somewhere on your disk (as plain text or in some JSON file, it escapes me), so even if you somehow completely bricked Sublime Text, you were still able to easily recover them. Not the case with Zed, I just went through all the SQLite database's tables' records with no luck. This is an extremely destructive side effect that led to loss of very valuable information.
As @ghost said, Zed is unusable like this and at least for me, this was a very important blocker to switch over to Zed (as I commented on the related issue).
EDIT: With some hacking I was able to partially recover the contents using a hex editor on the .sqlite file -- it was probably dangling somewhere in a deallocated space
I'm experiencing the same issue on Ubuntu 22.04 with version 0.197.3
I'm still experiencing this bug.
I have tried setting "restore_on_startup": "last_session", "restore_on_startup": "last_workspace", and removing the setting to rely on the default. None of these preserve my session when quitting and re-opening.
These options were pulled from the docs: https://zed.dev/docs/configuring-zed#restore-on-startup
My environment:
OS: macOS 15.5 Zed: 0.198.6
Can confirm "restore_on_startup": "last_session" DOES NOT work on the latest macOS & Zed versions. It's pretty disruptive for doing stuff.
OS: macOS 15.6 Zed: 0.198.6
New user here. Had to read through several feature request issues, before finding this one and realizing the feature was already implemented but is now broken. :(
Zed:
Zed 0.202.7
OS:
VERSION="2025.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian
Update: Turns out (https://github.com/zed-industries/zed/issues/15098#issuecomment-2630981105) I had to open a local folder, and now session is getting restored. It's possible (at least some of) the earlier "me too" replies are from new users like me.
Thanks. The "open a local folder" work-around works for #metoo. 😃
If that is not something the devs plan to fix anytime soon many desperate users would probably be totally grateful for an honored mentioning of this insufficiency in the documentation.
Please add this to the docu advising "restore_on_startup": "last_session". Thank you! People loose work because of this bug.
i have same problem with restoring last session, this bug still not fix?
unfortunately, I haven't figured out how to do this so that I always have all open files after restarting (even with workaround with dummy workspace) and can also open new files from the terminal these files are either not added to the current session/workspace or open in a new, completely empty window where the previous files are not present
- macOS 26
- uninstalled Zed
- deleted ~/.config/zed
- deleted ~/Library/Application Support/Zed/db
- installed Zed
- opened file
- closed (cmd + q)
- re-opened
- nothing restored
yeah, not great :)
ok, maybe it's just my reading comprehension, sorry:
Restore all workspaces that were open when quitting Zed
(https://zed.dev/docs/configuring-zed#restore-on-startup)
single files not in a workspace / local folder are apparently not a "session".
tbf the settings menu is a bit more vague:
Restore On Startup What to restore from the previous session when opening Zed.