scalpel@labs: ~/glossary/suspend-other-tabs.mdx5 sections

Suspend All Other Tabs in a Window

Suspend other tabs discards every tab in the current window in one go, except the tab you are viewing. Pinned tabs, audio tabs, sites on your never-suspend list, and tabs with unsaved input are left alone.

extension: Scalpel Tab Suspenderupdated: 2026-08-14read_time: 1 min
less suspend-other-tabs.mdx

Why it matters

You have twenty tabs open, and you've narrowed down to the one thing you need to focus on. Suspend other tabs frees the memory in the rest of the window in one action, without touching the one tab you're reading.

This is faster than clicking each tab and suspending it manually, and it respects your protections (pinned tabs, audible playback, your never-suspend list) so you don't accidentally suspend something important.

How it works

Suspend other tabs queries every tab in the current window, excluding the one you're viewing. For each of the others, Scalpel checks whether it's protected by any exclusion: pinned, audible, on your never-suspend list, or has unsaved input.

If a tab is protected, it stays open. If not, Scalpel suspends it.

You don't switch windows. The action runs on the active window only.

What does not matter

Suspend other tabs does not suspend the tab you're on, even if it's protected. The protection rules only apply to the "other" tabs. If you're viewing a pinned tab, suspend other tabs still works; it just skips the other pinned tabs too.

The order of tabs doesn't matter. Scalpel doesn't care whether a tab is to the left or right of the active tab; it processes all of them.

Suspend other tabs does not change your inactivity timer or settings. The automatic sweep keeps running as usual. This is a one-time bulk action.

Code example

Here's the suspend-other-tabs logic:

// Suspend every tab in this window except the active one
async function suspendOtherTabs() {
  // Get the current window and active tab
  const currentWindow = await chrome.windows.getCurrent();
  const activeTabs = await chrome.tabs.query({ active: true, windowId: currentWindow.id });
  const activeTab = activeTabs[0];

  if (!activeTab) {
    console.log('No active tab found');
    return;
  }

  // Get all tabs in this window
  const allTabs = await chrome.tabs.query({ windowId: currentWindow.id });

  let suspendedCount = 0;

  for (const tab of allTabs) {
    // Skip the active tab
    if (tab.id === activeTab.id) {
      continue;
    }

    // Skip tabs that can't be suspended (chrome://, etc.)
    if (!tab.url.startsWith('http://') && !tab.url.startsWith('https://')) {
      continue;
    }

    // Check protections
    if (await isTabProtected(tab)) {
      console.log(`Skipping protected tab: ${tab.title}`);
      continue;
    }

    // Suspend this tab
    await chrome.tabs.discard(tab.id);
    suspendedCount++;
  }

  console.log(`Suspended ${suspendedCount} tabs`);
}

// Helper: is the tab protected by any exclusion?
async function isTabProtected(tab) {
  // Check pinned
  if (tab.pinned) {
    const { protectPinned } = await chrome.storage.sync.get({ protectPinned: true });
    if (protectPinned) return true;
  }

  // Check audible
  if (tab.audible) {
    const { protectAudible } = await chrome.storage.sync.get({ protectAudible: true });
    if (protectAudible) return true;
  }

  // Check never-suspend list
  if (await isOnNeverSuspendList(tab.url)) {
    return true;
  }

  // Check unsaved form input
  if (await tabHasUnsavedInput(tab.id)) {
    return true;
  }

  return false;
}

// Keyboard shortcut: Alt+Shift+S
chrome.commands.onCommand.addListener((command) => {
  if (command === 'suspend-others') {
    suspendOtherTabs();
  }
});

// Button click handler
document.getElementById('suspendOthersButton').addEventListener('click', () => {
  suspendOtherTabs();
});

How Scalpel shows it

The popup has a "Suspend other tabs" button next to "Suspend now". Click it to suspend everything except the tab you're viewing. The keyboard shortcut Alt+Shift+S does the same thing. The stats panel updates to show the new suspended-tab count.

Sources