# Save and open sessions

> Save everything Cloak Proxy captured to a .cloaksession file with full bodies, and open it again later, on another Mac or alongside new traffic.

Source: https://docs.subcloak.com/cloak-proxy/sessions/save-and-open/

Captured traffic stays until you clear it, and by default it's [kept between launches](https://docs.subcloak.com/cloak-proxy/reference/settings/#keep-traffic-between-launches) too. Save it as a session file (`.cloaksession`) to keep a debugging session, attach it to a bug report, or pick up where you left off. A session file keeps every request and response with full headers and bodies, along with the highlights and comments you added, so when you open it again everything looks the way it did when you saved it.

## Save a session

1. Choose **File › Save Session…** or press <kbd>⌘</kbd> <kbd>S</kbd>.
2. Choose a name and folder. The suggested name is `Cloak Proxy` followed by the date and time, such as `Cloak Proxy Oct 13, 2026 at 9.41 AM.cloaksession`.
3. Leave **Redact secrets: tokens, cookies, passwords, API keys and card numbers** off to keep an exact copy, or turn it on if the file will be shared. See [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/).
4. Click **Save**.

**Save Session** always saves every captured request, whatever the main window's filters and selection show. To save only some requests, select them and use **File › Export › Cloak Proxy Session…**, or right-click them and choose **Export Request › Cloak Proxy Session…**. See [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/).

The **Redact secrets** checkbox remembers its last setting across saves and exports.

> **Session files contain credentials:**
> An unredacted session holds everything that crossed the proxy: cookies, `Authorization` headers, API keys, passwords in request bodies and personal data in responses. Store it like a password. Turn on **Redact secrets** before you send it to anyone, and delete copies you no longer need.

## Open a session

You can open a session, a HAR file or a Charles JSON session in three ways:

| How | Details |
|---|---|
| **File › Open Session…** | Press <kbd>⌘</kbd> <kbd>O</kbd>. You can select several files at once. |
| Drag and drop | Drop `.cloaksession`, `.har`, `.chlsj` or `.json` files onto the main window. |
| Search Everything | Press <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>A</kbd> and choose **Open Session, HAR or Charles File…**. |

When a file opens:

- Its requests are **added** to the traffic list. Anything already captured stays. To see only the file's contents, press <kbd>⌘</kbd> <kbd>K</kbd> (**File › Clear Session**) first.
- Each request gets a new number so it can't clash with requests already in the list.
- Requests that don't record which app sent them are listed under the app **Imported: name**, where name is the file name without its extension. Requests from a `.cloaksession` file keep their original app.
- Highlights and comments saved in the file come back on their requests. This works for `.cloaksession` files and for HAR files that have a `comment` or `_cloakHighlight` field on an entry. (added in Cloak Proxy 0.2.0)
- The first imported request is selected.

If a file can't be read, Cloak Proxy shows **Couldn't open** followed by the file name and the reason, such as "This file isn't a Cloak Proxy session, HAR, or Charles session".

For HAR and Charles files, see [Import](https://docs.subcloak.com/cloak-proxy/sessions/import/).

## What a session file contains

A `.cloaksession` file is JSON. At the top level it has:

```json title="Example.cloaksession (trimmed)"
{
  "format": "cloak-proxy-session",
  "version": 1,
  "savedAt": "2026-10-13T09:41:00Z",
  "flows": [ ]
}
```

Each entry in `flows` keeps:

| Kept | Details |
|---|---|
| Request | Method, URL, scheme, host, port, path and query, HTTP version, every header and the body. |
| Response | Status code, reason phrase, HTTP version, every header and the body. |
| State | Whether the request completed, failed (with the error), or passed through as an undecrypted tunnel. |
| Timing | When the request started and when it finished. |
| Client | The app that sent it and the client's address. |
| Decryption | Whether the request was decrypted. |
| Tools | The debugging tools that touched it, such as **Map Local** or **Breakpoint**. |
| WebSocket messages | Every message sent and received on a WebSocket connection. |
| Annotations (added in Cloak Proxy 0.2.0) | The request's highlight color and comment, in an `annotation` object such as `{"color": "red", "comment": "Check the address format"}`. Left out when the request has neither. |

Bodies are stored exactly as captured (base64-encoded inside the JSON), including compressed bodies, so nothing is lost. If a body was cut at the body size limit when it was captured, the saved copy is cut too. See [Network settings](https://docs.subcloak.com/cloak-proxy/capture/network-settings/).

Not saved:

- Your debugging tool rules. Use **Tools › Export Rules…** for those. See [Rules and matching](https://docs.subcloak.com/cloak-proxy/tools/rules-and-matching/).
- Insights results and alert history, which are recalculated from the requests.

## Session or HAR?

| | `.cloaksession` | `.har` |
|---|---|---|
| Opens in | Cloak Proxy | Cloak Proxy, browsers' developer tools, Charles, Proxyman and most HTTP tools |
| Bodies | Exactly as captured | Decoded, as text or base64 |
| Undecrypted tunnels | Kept | Left out |
| WebSocket messages | Kept | Left out |
| Tools applied | Kept | Left out |
| Highlights and comments (added in Cloak Proxy 0.2.0) | Kept | Kept: the comment in the standard `comment` field, the color in a custom `_cloakHighlight` field |

Use a session to keep a complete copy for yourself or another Cloak Proxy user. Use HAR when the other person uses a different tool. See [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/#har).

## Save from the command line

`cloakctl run --record session.cloaksession -- <command>` records a headless run straight to a session file. Any extension other than `.har` writes a Cloak Proxy session. See [Headless and CI](https://docs.subcloak.com/cloak-proxy/automation/headless-and-ci/).

## Related

  - [Import](https://docs.subcloak.com/cloak-proxy/sessions/import/): Open HAR, Charles and cURL.
  - [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/): HAR, CSV, Postman, OpenAPI and Copy as.
  - [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/): What Redact secrets removes.
  - [Recording and sessions basics](https://docs.subcloak.com/cloak-proxy/capture/recording-and-sessions-basics/): Pause recording, clear, and keep sessions across launches.
