Use case · Session resume

# I started on my laptop, and now I am at my desktop. *Pick up where you left off.*

Your agent on the desktop gets back the work you did on the laptop, so you do not explain it again. One command rebuilds it there as a session file, and your agent's own resume opens it.

[Get started free](https://console.context-mode.com/login) [Read the docs](https://context-mode.com/docs/session-resume)

Laptop to desktop

Built-in resume The command What comes back Other agent New session

At the desktop, you type claude --resume.

Built-in resume

- Reads session files on this computer
- Laptop session: copy the file yourself
- File deleted: session gone
- Same agent only

With Context Mode

- Reads the copy the gateway keeps
- One command, on any machine
- File deleted: rebuilt from the copy
- Claude Code or Codex

From the comparison in the Session resume docs.

In the console: Sessions, then Open in Claude Code. Copy the line.

```
# on the desktop, in the project folder
$ curl -fsSL https://<host>/cm-resume.mjs \
    -o /tmp/cm-resume.mjs \
  && node /tmp/cm-resume.mjs \
    --gw https://<host> \
    --handoff 'scope=…&t=…' --launch
```

The console fills in the host and the token. The line works for 15 minutes.

The script writes a session file and opens it.

```
~/.claude/projects/<folder>/<id>.jsonl
$ claude --resume <id>
```

Comes back

- The latest 200 messages per session
- A summary of older messages
- Tool names, as (tool: Bash)

Stays behind

- Tool output
- Text the client adds on its own
- Sessions that went direct to the model

Each text block is cut at 6,000 characters.

Started in Claude Code. Carry on in Codex.

```
~/.codex/sessions/YYYY/MM/DD/
  rollout-<time>-<id>.jsonl
$ codex resume <id>
```

The copy belongs to the workspace, not to the agent. The Codex writer was tested with Codex 0.156.1.

No resume. A new session, the next morning.

```
"Morning. Where did I leave off yesterday, and which ticket am I on?"

⏺ context-mode · memory +1 record about user
You're on PAY-1432 ... You already made the commit yesterday.
```

Memory adds the facts that match to the first request, on any machine. The Memory screen lists user current_ticket PAY-1432.

The problem

## The session is on the laptop. *You are not.*

**Resume reads this computer**

Built-in resume opens session files on the machine you sit at. The laptop's sessions are not there.

**Copying files is a chore**

To move a session, you find its file and copy it yourself. If the file is gone, so is the session.

**One agent only**

A session from one agent does not open in the other. You explain the task again.

How it works

## Work as usual. *Paste one line.*

1. 01 **Work on the laptop** Each request adds its new messages to the copy of your workspace: one project, one worktree.
2. 02 **Copy the command** In the console, open Sessions and click Open in Claude Code or Open in Codex. The command works for 15 minutes.
3. 03 **Paste it on the desktop** In the project folder. You need curl, Node.js and your agent. The script writes a session file and starts claude --resume or codex resume.

Saving happens before the gateway changes anything. The desktop reads the copy, not the laptop.

Proof

## What comes back, *and what does not.*

**200 messages** the latest per session, with a summary of older ones and tool names

**50 sessions** the most recent in the workspace, joined into one conversation, oldest message first

**15 minutes** until the command expires. It reads only your own account's workspaces. Until then, anyone with it can read the session, so do not paste it in a shared channel.

|  | Context Mode | Built-in resume |
| --- | --- | --- |
| Where sessions live | The gateway | This computer |
| On another machine | One command | Copy the file yourself |
| Local file deleted | Rebuilt from the copy | Session gone |
| Other agent | Claude Code or Codex | No |
| What comes back | Message text, tool names, a summary before the latest 200 messages | The whole local file |

Built-in resume brings back more detail, because it reads the full file with tool output. The first request after a resume sends the rebuilt history to your model, so a long history adds tokens. Session resume is not a cost feature and is not measured on its own; for the gateway as a whole, see [Benchmarks](https://context-mode.com/docs/benchmarks#pooled). [The full comparison →](https://context-mode.com/docs/session-resume#compared)

Products used

## What this *uses.*

**[Session resume](https://context-mode.com/session-resume)**

Rebuilds a conversation as a session file on any machine, in either agent.

**[Memory](https://context-mode.com/memory)**

For a new session instead of a resume: the facts that match go to the first request, on any machine.

**[Session resume docs](https://context-mode.com/docs/session-resume)**

The command, where the file goes, and what comes back.

**[Memory docs](https://context-mode.com/docs/memory)**

How facts are kept, scoped and added to a new session.

Related: [Shared context](https://context-mode.com/solutions/shared-context) · [All-day session](https://context-mode.com/use-cases/all-day-session) · [Search past sessions](https://context-mode.com/use-cases/search-past-sessions)

## Same work, *next machine.*

*npx @context-mode/cli* connects your agents. 1,000 requests free, no card.

[Get started free →](https://console.context-mode.com/login) [Read the docs →](https://context-mode.com/docs/session-resume)
