---
title: "Proactive memory-pressure cleanup"
method: POST
path: "/pressure/cleanup"
tags: ["System"]
---

# Proactive memory-pressure cleanup

`POST /pressure/cleanup`

Closes tabs observed idle across multiple checks while preserving tabs
with active/queued operations. Never returns URLs, titles, cookies,
page text, or user IDs. Defaults to dry-run mode.

## Request body

- object
  - `dryRun` boolean — When true, returns candidates without closing them.
  - `minIdleMs` number — Minimum idle time (ms) before a tab is eligible.
  - `maxTabsToClose` number — Maximum tabs to close per invocation.
  - `minTabsPerSession` number — Preserve at least this many tabs per session.
  - `closeEmptySessions` boolean — Close sessions left with zero tabs after cleanup.

## Response `200`

Cleanup result with before/after counts and hashed metadata.

- object
  - `ok` boolean
  - `dryRun` boolean
  - `before` object
    - `sessions` integer
    - `tabs` integer
  - `after` object
    - `sessions` integer
    - `tabs` integer
  - `candidates` integer
  - `closed` object[]
  - `preserved` object

## Changes

- **2026-05-10** `2e1c3d264907` — 1 info
  - endpoint added
- **2026-04-25** `80bb18f1c19f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/jo-inc/apis/camofox-browser/changes/pressure/cleanup/post.md)

---

[API](https://skmtc.dev/jo-inc/apis/camofox-browser.md) · [All operations](https://skmtc.dev/jo-inc/apis/camofox-browser/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jo-inc/camofox-browser/revisions/d007e73dad3d/schema)
