# Recording and sessions

> Pause recording, mute noisy apps and hosts, focus on a few apps, clear captured requests, and choose whether Cloak Proxy keeps your captured traffic when it quits.

Source: https://docs.subcloak.com/cloak-proxy/capture/recording-and-sessions-basics/

Everything Cloak Proxy captures goes into the current session: the list of requests in the main window. You can pause recording to stop the list from growing, mute apps you don't care about, focus on the few you do (see [Focus mode and session size](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/)), clear the list to start over, keep it when Cloak Proxy quits, and save it to a file. This page covers those basics.

## Pause recording

Pausing stops new requests from being added to the list. Traffic keeps flowing through Cloak Proxy, and your [debugging tools](https://docs.subcloak.com/cloak-proxy/tools/overview/) keep working: only the recording stops. Use it to freeze the list while you read it, or to keep noise out between two tests. From 0.4.2, pausing also stops decryption and rules by default: see [Hands off while paused](#hands-off-while-paused).

| Where | Control |
|---|---|
| Keyboard | <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>R</kbd> |
| Menu bar | **Proxy › Pause Recording** / **Resume Recording** |
| Toolbar | **Pause** / **Record** (the red record button) |
| Search Everything (<kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>A</kbd>) | **Pause Recording** / **Resume Recording** |

While recording is paused:

- the status capsule in the toolbar turns orange and reads **Paused** followed by the address,
- the toolbar button reads **Record**. Press it, or <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>R</kbd>, to resume.

A request that was still in progress when you paused may keep showing as in progress, because its response arrives while recording is off. Sessions you open from a file are added even while recording is paused.

Recording is on every time Cloak Proxy opens.

> **Record only what you care about:**
> To keep recording but list only certain requests, use the [Allow List](https://docs.subcloak.com/cloak-proxy/tools/allow-list/): everything else still works but isn't shown. To hide requests from view without dropping them, use [filters](https://docs.subcloak.com/cloak-proxy/inspect/filtering/).

### Hands off while paused

(added in Cloak Proxy 0.4.2)

From 0.4.2, pausing also takes Cloak Proxy's hands off the traffic: it keeps flowing through Cloak Proxy, but untouched. Nothing is decrypted and no debugging tools or rules apply, so sign-ins and bot-protected sites work as if Cloak Proxy weren't there. That makes pausing the quick way to sign in to a site that refuses decrypted connections (see [Decrypting a browser](https://docs.subcloak.com/cloak-proxy/capture/ssl-proxying/#decrypting-a-browser)). Up to 0.4.1, pausing only stops the recording, as described above.

While paused in 0.4.2:

- the status capsule reads **Paused · traffic untouched** (or **Paused · still intercepting**, below); hover it for the address,
- connections Cloak Proxy had decrypted close once their requests in flight finish (an upload in progress completes; HTTP/2 connections get GOAWAY, HTTP/1.1 ones close after the current response, idle ones at once, anything still open after 30 seconds is closed), and apps reconnect on their own through encrypted tunnels. When you resume, tunnels to hosts that SSL Proxying covers close once they've been quiet for a second, so they're decrypted again.

To keep decrypting and keep your Map Local, breakpoints, scripts and other rules working while nothing is recorded (how Cloak Proxy behaves up to 0.4.1), choose **Keep intercepting, just don't record** under **While recording is paused** in **Settings › General**. The default is **Pass traffic through untouched**. From an AI assistant, `set_recording` takes `while_paused` (`passThrough` or `intercept`) and returns `whilePaused` and `handsOff`.

## Mute noisy apps and hosts

(added in Cloak Proxy 0.2.0)

Some apps send a steady stream of requests you don't need: sync clients, chat apps, telemetry. Muting an app stops Cloak Proxy from recording its traffic, so the requests you care about aren't buried. The app keeps working through Cloak Proxy as before.

1. Right-click the app in the **Apps** section of the [sidebar](https://docs.subcloak.com/cloak-proxy/inspect/sidebar/), or right-click one of its requests in the traffic list.

2. Choose **Mute _app_ (Stop Recording It)**.

   New requests from the app stop appearing. Requests already in the list stay until you clear or remove them.

Hosts work the same way (added in Cloak Proxy 0.5.4): right-click a host, or a request, and choose **Mute** › **Mute _host_** or **Mute \*._domain_**. See [Mute a host or a domain](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/#mute-a-host-or-a-domain).

To record the app again, right-click it and choose **Unmute _app_**, or open **Settings › General**, find it under **Muted apps and hosts** and click **Unmute**. If the app is no longer in the sidebar, for example after you clear the session, Settings is the place to unmute it.

| Behavior | Details |
|---|---|
| Traffic | Still goes through Cloak Proxy. Muting doesn't block or slow anything. |
| [Debugging tools](https://docs.subcloak.com/cloak-proxy/tools/overview/) | Still apply to the app's requests. A [breakpoint](https://docs.subcloak.com/cloak-proxy/tools/breakpoint/) still pauses them and [Map Local](https://docs.subcloak.com/cloak-proxy/tools/map-local/) still answers them, even though they don't appear in the list. |
| [Alerts](https://docs.subcloak.com/cloak-proxy/tools/alerts/) | Don't fire for a muted app, because alerts check recorded requests. |
| Names | Matched by the whole app name, ignoring case. A device on your network is muted by its IP address, for example `192.168.1.20`. |
| Remembered | The **Muted apps and hosts** list is saved and applies every time Cloak Proxy opens. |
| Cloak Proxy's own requests | The menu doesn't offer muting **Cloak Proxy (Repeat)** or **Cloak Proxy (Compose)**, so requests you send with [Repeat and Compose](https://docs.subcloak.com/cloak-proxy/tools/repeat-and-compose/) are always listed. |

When nothing is muted, the **Muted apps and hosts** section of **Settings › General** says **None. Right-click an app or a host in the sidebar, or a request, and choose Mute to stop recording its traffic.** An assistant connected through the [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) can mute and unmute apps and hosts with the `mute_app` and `mute_host` tools.

### Mute, pause, Allow List or filter?

| To | Use |
|---|---|
| Record only a few apps or hosts, for as long as you like | [Focus mode](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/#focus-mode) (added in Cloak Proxy 0.5.4) |
| Stop recording one app, for as long as you like | **Mute** |
| Stop recording everything for a moment | [Pause recording](#pause-recording). From 0.4.2, tools and rules don't apply while paused unless you choose **Keep intercepting** ([Hands off while paused](#hands-off-while-paused)). |
| Record only certain hosts or paths | The [Allow List](https://docs.subcloak.com/cloak-proxy/tools/allow-list/). Limit its rules to one app with [Only these apps](https://docs.subcloak.com/cloak-proxy/tools/rules-and-matching/#limit-a-rule-to-apps). |
| Record everything but show only some of it | [Filters](https://docs.subcloak.com/cloak-proxy/inspect/filtering/) or the [sidebar](https://docs.subcloak.com/cloak-proxy/inspect/sidebar/) |
| Never send a host through Cloak Proxy at all | **Bypass** (Settings › Bypass): no CPU at all |

## Clear the session

Clearing removes every request from the list, along with their highlights and comments, and selects **All Traffic** in the sidebar again.

| Where | Control |
|---|---|
| Keyboard | <kbd>⌘</kbd> <kbd>K</kbd> |
| Menu bar | **File › Clear Session** |
| Toolbar | **Clear** (the trash button) |
| Bottom bar | **Clear** |
| Search Everything | **Clear Session** |

> **Caution:**
> Clearing can't be undone and doesn't ask first. [Save the session](https://docs.subcloak.com/cloak-proxy/sessions/save-and-open/) first if you might need it.

Clearing doesn't touch your settings, rules, pinned sidebar items or saved filter presets. If [Keep captured traffic when Cloak Proxy quits](#keep-traffic-when-cloak-proxy-quits) is on, clearing also deletes the saved copy.

## Remove some requests

To remove only some requests, select them in the traffic list, right-click, and choose **Remove** (or **Remove** followed by the number of requests when several are selected). Their highlights and comments go with them.

## How sessions are kept

*[Screenshot: The traffic list with 47 captured requests, the inspector, and the bottom bar showing 1/47 rows selected, the tools that are on, CA trusted, memory and throughput. The bottom bar counts the rows in the current session.]*

| Behavior | Details |
|---|---|
| Kept when you quit | By default, the traffic list is saved and comes back at the next launch. See [Keep traffic when Cloak Proxy quits](#keep-traffic-when-cloak-proxy-quits). |
| Not lost when you close the window | Closing the main window keeps Cloak Proxy running and recording. Click the Dock icon to bring it back. |
| Large bodies on disk | Bodies of 64 KB and more move to files on disk when their request finishes, and older bodies follow once the bodies in memory pass 64 MB. Recent and small bodies stay in memory. Everything that reads bodies (the inspector, search, export, Insights and every tool) reads them back from disk when it needs them. |
| How much is kept | (added in Cloak Proxy 0.5.4) The last 100,000 requests and a week of traffic by default, set in **Settings › General › Capture**. The oldest are trimmed in the background; highlighted, commented and Findings requests are never trimmed. See [How much traffic is kept](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/#how-much-traffic-is-kept). |
| Cut bodies | Bodies larger than the [Max captured body size](https://docs.subcloak.com/cloak-proxy/capture/network-settings/#limit-the-captured-body-size) (32 MB by default) are kept only in part. They're still forwarded in full. |
| Annotations | Highlights and comments belong to the session and are removed with their requests. |

The files for bodies on disk are in `~/Library/Application Support/CloakProxy/Session`, readable only by your macOS account. **Clear Session** deletes them, and so does quitting while **Keep captured traffic when Cloak Proxy quits** is off.

The session keeps the last 100,000 requests and a week of traffic by default (added in Cloak Proxy 0.5.4), trimming the oldest (never highlighted, commented or Findings requests). See [How much traffic is kept](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/#how-much-traffic-is-kept).

## Keep traffic when Cloak Proxy quits

(added in Cloak Proxy 0.2.0)

Cloak Proxy saves the traffic list and opens it again at the next launch, so you can pick up where you left off after a restart, a crash or a Mac update. This is on by default for new installs. To turn it off or on:

1. Open **Settings › General**.

2. Under **Capture**, turn **Keep captured traffic when Cloak Proxy quits** off or on.

*[Screenshot: The General settings page with the Listening, macOS traffic, While recording is paused, HTTP/2, HTTP/3 and Capture sections; the Capture section has Max captured body size set to 32 MB and Keep captured traffic when Cloak Proxy quits turned on. Settings › General. The Keep captured traffic switch is in the Capture section.]*

While the setting is on:

| Behavior | Details |
|---|---|
| What's saved | Every request in the traffic list, with its [highlight and comment](https://docs.subcloak.com/cloak-proxy/inspect/traffic-list/). |
| When | Every 30 seconds, if anything changed, and when you quit. A crash loses at most the last 30 seconds or so. Saving runs in the background, so it doesn't slow the app down. |
| Where | `~/Library/Application Support/CloakProxy/Session`. Bodies already on disk are saved as references to their files, so even large sessions save and open quickly. Only your macOS account can read the files. |
| Restored | The next time Cloak Proxy opens, as long as the setting is still on. New requests are numbered after the restored ones. |
| Deleted | When you [clear the session](#clear-the-session), when the list is empty at the next save, and when you turn the setting off. |

If you turned the setting off yourself in an earlier version, your choice is kept. Saving a session yourself with **File › Save Session…** works the same either way.

> **The saved files hold your decrypted traffic:**
> The saved session contains everything in the list: cookies, tokens, passwords and personal data from decrypted requests, unredacted. Only your account can read it, but it stays on disk between launches and can end up in backups of your Mac. Turn the setting off when you inspect sensitive traffic, and clear the session when you're done.

## Save, open and export

| Task | How |
|---|---|
| Save the whole session | **File › Save Session…** (<kbd>⌘</kbd> <kbd>S</kbd>) saves every captured request as a `.cloaksession` file. |
| Open a saved session or another tool's file | **File › Open Session…** (<kbd>⌘</kbd> <kbd>O</kbd>) opens `.cloaksession`, HAR (`.har`), Charles JSON (`.chlsj`) and `.json` files. You can select several files. |
| Open by dragging | Drop one of those files onto the main window. |
| Export | **File › Export** saves as **Cloak Proxy Session**, **HAR**, **CSV**, **Postman Collection** or **OpenAPI (YAML)**. It exports the selected requests when more than one is selected, otherwise all visible requests. |
| Export from the list | Right-click requests and choose **Export Request** or **Export** followed by the number of requests. |

Opened requests are added to the current session rather than replacing it. Each gets a new number, and requests without an app are listed under an app named **Imported:** followed by the file name. See [Save and open sessions](https://docs.subcloak.com/cloak-proxy/sessions/save-and-open/), [Import](https://docs.subcloak.com/cloak-proxy/sessions/import/) and [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/).

> **Sessions contain secrets:**
> A saved session or exported file holds everything Cloak Proxy decrypted: cookies, tokens, passwords and personal data. The export panel has a **Redact secrets: tokens, cookies, passwords, API keys and card numbers** checkbox, and Cloak Proxy remembers your choice. Turn it on before you share a file. See [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/).

## Automate recording

- MCP tools `set_recording` and `clear_session` pause, resume and clear from an AI assistant; from 0.4.2, `set_recording`'s `while_paused` chooses what paused traffic gets. (added in Cloak Proxy 0.4.2) See [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/).
- `cloakctl export --out session.har` saves the running app's session as HAR. See [cloakctl](https://docs.subcloak.com/cloak-proxy/automation/cloakctl/).
- `cloakctl run --record run.har` records a headless proxy to a file. See [Headless and CI](https://docs.subcloak.com/cloak-proxy/automation/headless-and-ci/).

## Related

  - [Save and open sessions](https://docs.subcloak.com/cloak-proxy/sessions/save-and-open/): The .cloaksession format, opening and dragging files.
  - [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/): HAR, CSV, Postman, OpenAPI and Copy as.
  - [Traffic list](https://docs.subcloak.com/cloak-proxy/inspect/traffic-list/): Columns, sorting, highlights and comments.
  - [Allow List](https://docs.subcloak.com/cloak-proxy/tools/allow-list/): Record only the requests you care about.
