Is there a 'Restore session' command-line argument for Firefox?

Your question is oddly framed.  Why do you specifically want to be able to do this from a script?  Do you just want to be able to start Firefox and restore your previous session, or do you specifically want to do this only part of the time?

Firefox has an option to restore the previous session all the time.  In “Options” / “General”, set “When Firefox starts” to “Show your windows and tabs from last time”:

Firefox “Options” / “General” page

Then just start Firefox normally, and it will restore your previous session.


I think the UI setting to just load your last session on start up as shown in the other answer is the best. But just in case someone absolutely needs to know how to do this with command line you can try

firefox.exe -new-tab about:sessionrestore

It's actually just a page so it can be used with the -new-tab and -new-window parameters.