I also have had trouble for a while restoring session when quitting properly, although killing Firefox instead usually seems to restore correctly.
Trying to copy either the session.js or some .bak files as restore.js usually works. After cleaning up the 800 tabs in one window, I've quit it correctly, but it consistently failed to restore one of the windows, with more than 1200 tabs (I know, it's a bad idea), openning it with just empty tabs. The other windows restored fine though. I ended up using python to split the tabs to several windows. 600 tabs per windows seemed fine at first, but there were still some empty tabs. 300 seems to work fine. Here is how I did it: $ cd ~/.mozilla/firefox/*.default/sessionstore-backups $ cp recovery.bak.001 recovery.js $ python > import json >>> s=json.loads(open("recovery.js", "rb").read()) >>> for l in s['windows']: ... len(l['tabs']) ... 44 1257 5 >>> s['windows'].append({}) >>> s['windows'].append({}) >>> s['windows'].append({}) >>> for k in s['windows'][1].keys(): ... s['windows'][3][k] = s['windows'][1][k] ... s['windows'][4][k] = s['windows'][1][k] ... s['windows'][5][k] = s['windows'][1][k] ... >>> for l in s['windows']: ... len(l['tabs']) ... 44 1257 5 1257 1257 1257 >>> t = s['windows'][1]['tabs'] >>> s['windows'][1]['tabs'] = t[0:300] >>> s['windows'][3]['tabs'] = t[300:600] >>> s['windows'][4]['tabs'] = t[600:900] >>> s['windows'][5]['tabs'] = t[900:] >>> for l in s['windows']: ... len(l['tabs']) ... 44 300 5 300 300 357 >>> open("recovery.js", "wb").write(json.dumps(s))