scalpel@labs: ~/glossary/pause-tab-suspension.mdx5 sections

Pausing Tab Suspension: A Temporary Off Switch

Pausing is a temporary off switch for the automatic sweep. While paused, no tab is suspended on its timer, but you can still suspend or restore tabs by hand. Resuming turns the sweep back on with your settings untouched.

extension: Scalpel Tab Suspenderupdated: 2026-08-14read_time: 2 min
less pause-tab-suspension.mdx

Why it matters

Sometimes the automatic sweep gets in your way. You're giving a demo and don't want a tab to suspend mid-screen share. A slow download needs to keep running without distraction. You're on a video call and your background tab shouldn't reload and spike bandwidth.

Pause lets you stop suspending without changing your inactivity timer back and forth. It's a few seconds of setup, not a settings edit.

How it works

Pausing stores a flag in the extension's background state. When the automatic sweep checks whether to suspend a tab, it first checks: is suspension paused? If yes, skip every tab (except those already suspended). If no, run the normal checks.

Resuming sets the flag back to active. Your timer stays exactly as you left it; you don't have to re-enter it or relearn it.

The pause state lives in Chrome's storage, so it survives a browser restart. If you close the browser mid-pause, it stays paused when you reopen it. That's usually what you want (the demo went long, you closed the laptop, now you're back), but check the popup the next morning if you pause before bed.

What does not matter

Pausing does not change your settings. The timer stays at 20 minutes, or 1 hour, or whatever you set. Your never-suspend list stays intact. Your pinned-tab protection is still on. Nothing is forgotten.

Pausing affects the automatic sweep only. You can still click "Suspend now" or "Suspend other tabs" and they work instantly. Restore still works. The popup still shows you how many tabs are suspended. Everything manual is unaffected.

If you pause and then restart the browser, the pause state persists, but a tab that was already suspended will not un-suspend automatically. Suspension is final until you restore it, even if you pause right after suspending a tab.

Code example

Here's how the pause state flows through the extension:

// Storing the pause state in Chrome storage
async function setPauseState(isPaused) {
  await chrome.storage.local.set({ suspensionPaused: isPaused });
  // Notify the popup UI so it updates immediately
  chrome.runtime.sendMessage({ type: 'pauseStateChanged', isPaused });
}

// Before each automatic sweep, check the pause flag
async function shouldRunSweep() {
  const { suspensionPaused } = await chrome.storage.local.get('suspensionPaused');
  if (suspensionPaused) {
    console.log('Sweep paused; skipping automatic suspension');
    return false;
  }
  return true;
}

// The automatic sweep function (simplified)
async function runAutomaticSweep() {
  if (!await shouldRunSweep()) {
    return; // Paused, do nothing
  }

  // Get all tabs, check each one's inactivity timer, suspend if needed
  const tabs = await chrome.tabs.query({});
  for (const tab of tabs) {
    if (isInactive(tab) && !isProtected(tab)) {
      await chrome.tabs.discard(tab.id);
    }
  }
}

// The user clicked the pause/resume button
async function togglePause() {
  const { suspensionPaused } = await chrome.storage.local.get('suspensionPaused');
  await setPauseState(!suspensionPaused);
}

// Manual suspend still works even when paused
async function suspendNow(tabId) {
  const tab = await chrome.tabs.get(tabId);
  if (!isProtected(tab)) {
    await chrome.tabs.discard(tabId);
  }
}

How Scalpel shows it

The popup shows a play/pause icon. Click it to toggle. When paused, the icon changes colour and the popup displays "Suspension paused". You'll see this state persist across browser sessions unless you explicitly resume.

Sources