Published Tabzero Team· Updated

Chrome Sessions API: Recently Closed Tabs and Restore Limits

chrome.sessions can find and restore recently closed tabs or windows. It is useful for accidental closure, but it is not a long-term project archive and does not preserve the full state of every web application.

Chrome Sessions API: Recently Closed Tabs and Restore Limits

Know what the API returns

With the sessions permission, chrome.sessions.getRecentlyClosed() returns entries describing either a recently closed tab or a window. A Session contains a lastModified timestamp and one of tab or window. The API's maximum result count is 25, so the list is a limited recovery surface.

Read the entry type before displaying it. A closed window can contain several tabs, while a single-tab entry represents one tab. Labeling every entry as a page can mislead the person about what restore will open.

Restore by session ID, not old tab ID

chrome.sessions.restore(sessionId) reopens the selected closed tab or window. Without a sessionId, Chrome restores the most recently closed entry. Confirm the selected entry is still available when the user clicks Restore, because the recently closed list can change as browsing continues.

A sessions.Session.tab may carry a sessionId rather than a live tab id. Do not pass a stale tab id to tabs.update or tabs.get and expect it to recover the closed page. Use the session restoration method, then inspect the returned live tab or window.

Distinguish local recovery from synced devices

getDevices() can expose synced sessions from other devices when that browser feature is available. onChanged reports changes to recently closed tabs or windows, but Chrome says it does not monitor synced session changes. A live badge based only on onChanged would therefore misrepresent cross-device freshness.

Keep the interface honest about where an entry came from and when it was modified. Do not call a synced device's open-window list a guaranteed backup. Account and sync settings can affect what is available.

Chrome Sessions API: Recently Closed Tabs and Restore Limits contextual product example
An example browser-tab view for finding, selecting and returning to the pages that belong to a task. Credit: Tabzero.

Explain what restoration cannot promise

Reopening a URL may require sign-in and may not recover unsent forms, editor buffers or temporary application state. The API records browser sessions, not an exact archival copy of every website. For important writing, save in the original application before closing the tab.

A named project session should separately store selected URLs and a note explaining what was decided and what to do next. That record remains useful after the browser's limited recently closed list has moved on.

Idea: accidental-close recovery with context

Show recently closed entries beside the user's own saved project notes. If a closed URL matches a project source, offer to restore it into that project's workspace. Keep the two sources of information distinct: browser recovery is transient, while the note is the durable context.

A thoughtful interface can say 'Recently closed by Chrome' versus 'Saved in your project' and show the exact action each button performs. This helps prevent a false sense of backup coverage.

Test the limits

Close one tab and one window, fetch recently closed entries, restore each by its session ID and verify how many tabs reopen. Then browse enough to change the list and test what happens when the selected entry is no longer available.

Test without the sessions permission as well. A recovery feature should explain unavailable access and continue to offer any independent saved links the user already owns.

Tabzero: Browser Tab Manager & Notes

Save tab links, keep notes beside your sources, and return to what matters. Tabzero is in development preview; AI Notes remains planned.

Check availability