Atom won't save my default file tree


Normal is for application.json to have content when the application is open and look the same after it’s been closed.


application.json has no paths, where should I go from here?


Delete it, reopen Atom, and see what happens.


Didn’t work.

Before closing Atom (file tree open):
After closing Atom (file tree closed):

What gives? :confused:

Macbook-Air:storage ryan$ rm application.json 
Macbook-Air:storage ryan$ ls
Macbook-Air:storage ryan$```

Deleted, still no luck.


Does a new application.json appear after you delete it? Does it have a path in it while Atom is open?


It reappeared. When Atom was closed, the file was blank, it only had two brackets: []
After I opened atom, it showed this: [{"initialPaths":[]}]

But the file tree remained blank, when I opened a new directory path manually, it said this: [{"initialPaths":["/Users/ryan/Documents/Web Development"]}]

When I closed Atom, again, it said this: []

Not sure where to go from here.


At this point, there are three things I would try, in this order:

  1. Open the Terminal and start Atom with the command atom --safe /Users/ryan/Documents to start it in safe mode. Close Atom completely and check application.json once more. This step will eliminate the possibility that a package is interfering with Atom saving the state.
  2. Reinstall Atom, delete the /Users/ryan/.atom folder, and see if the behavior changes.
  3. Ask people who are knowledgeable about the program and use Macs. @leedohm, do you have any thoughts on this thread?

If the first two steps don’t change anything and the others who use Mac don’t pipe up, you could open an issue on GitHub with a link to this thread and a description of the problem (application.json resets to [] on closing the program). In the issue body, you would rephrase the statement of the problem in your most recent post, while including version numbers and indicating that you have tried safe mode


atom --safe /Users/ryan/Documents says it isn’t a command, I tried variants of it such as using “open” before hand, none worked. So I decided to delete .atom and start over, which didn’t fix the issue. Any chance the command you listed above isn’t correct? Anything else I could try before opening an issue?


That’s my bad. I forgot that Mac users have to use a menu item to install the shell commands.


I started it in safe mode, and it opened my Documents file tree. The application.json shows the proper directory, however, if I then close Atom and reopen normally (not safe mode) it no longer saves the session.


When you reopened Atom in normal mode, did you see the Documents folder? If deleting .atom didn’t fix the problem, but safe mode did, then I have no idea what would be wrong. If you didn’t see the Documents folder when you reopened in normal mode, then safe mode didn’t fix it.


It consistently will show the Documents folder ONLY if I open it with atom --safe /Users/ryan/Documents

Opening it normally returns a blank window, no file tree. It’s quite bizarre.


But after you close the safe mode window, there’s still nothing in application.json? That’s the important indicator. Whatever’s in that file after Atom closes is what will be grabbed when Atom opens back up, if it doesn’t have a target (like you’ve been giving it when you’ve been using the command line). The mode shouldn’t matter for that.

If Atom is consistently wiping application.json no matter how you close the program, that’s a bug and that’s what needs to be reported to the dev team.


Hi! Here is the similar problem: Atom needs root access to remember my session


Correct, application.json continues to be blank after closing the program, no matter how it was started.


I’ve created an issue HERE


I don’t believe they’re related. We ruled out the permissions possibility by demonstrating that application.json did get written to.


Hi, I also commented on a similar issue here: Atom constantly forgets last project when re-opened

Just want to report that my project list shows correctly after i once opened atom with atom --safe. Lets see how long it lasts :slight_smile:


Good luck. You’ve exhausted my detective toolkit.