---
title: Resuming and handoff
description: Sessions are durable. Resume a Claude Code or Codex session tomorrow, continue it on another machine, hand it to a teammate, or finish it with a different agent.
---

Picture a team working together. One member does some work, then hands it off to another.
Today people serialize that by hand. A `/handoff` skill writes a `HANDOFF.md`, and the next person
reads the markdown, checks out the branch, and reconstructs the rest from memory.

Polygraph captures the state of the world along with it. Resuming isn't a copy-paste into the agent's memory. It is a time machine that drops you exactly where the original author stopped. The agent can inspect the repos, follow the pull requests and issues, and run commands with the old context available.

This applies to any work done by anyone in the organization, no matter how cross-cutting. Every session feeds one shared memory, so your agent builds on what the whole team did.

{% youtube id="rgl2NXaU_sM" title="Start a session, allow to resume it by others" /%}

## Resume a session

Resume a session when you want to continue the same work, whether you started it in Claude Code,
Codex, or OpenCode.
You can resume a session you created or a session someone else handed to you.

```sh
polygraph session resume <session-id>
```

You can omit the ID and select a session from the list:

```sh
polygraph session resume
```

When you resume, Polygraph reconstructs the session state as closely as possible: the repos are set up at the relevant SHAs, along with the branches and available agent context.
Agent transcripts are included only when [session log sharing](/security#session-log-sharing) makes them visible.

## Share a session with someone else

A handoff is a resume done by someone else. Share the session ID or URL, and a teammate picks up exactly where you stopped, on their machine, with the context available to them.

Resuming someone else's session doesn't transfer authorship of it, and a session is visible only to
people who can read every repo it uses.
See [what sessions you can see](/security#what-sessions-you-can-see).

## Continue on another machine

Resuming works across machines and operating systems.
Start the work on one machine and pick it up on another, because Polygraph reconstructs the working
copies wherever you resume rather than reaching back to the machine you started on.

## Switch from Claude Code to Codex

A session isn't tied to the agent that started it.
Start the work in Claude Code and finish it in Codex, or the reverse, by choosing the agent when you
resume:

```sh
polygraph session resume <session-id> --agent codex
```

Different people on the same session can use different agents.

Resuming with the same agent continues its existing conversation. A different agent launches fresh with a startup prompt that re-establishes the session context. The choice applies to that resume only and doesn't change the session's stored agent.

### Which agent resumes the session

Sessions work across agents, so resuming has to pick one. Polygraph resolves the agent in this order:

1. **An explicit `--agent <type>` always wins.** Pass `claude`, `codex`, or `opencode` to switch directly, with no prompt.
2. **A bare `--agent` (no value) always opens the picker**, with the session's stored agent marked as current and pre-selected.
3. **Without the flag**, Polygraph compares the session's stored agent with your configured [default agent](/cli/config#agenttype):
   - If they match, the stored agent is used silently.
   - If they differ, the picker opens with the stored agent pre-selected, along with a note naming both (for example: "This session last ran under claude. Your configured default agent is codex.").
   - A stored agent with no configured default opens the picker with the stored agent pre-selected.
   - No stored agent uses the configured default silently. With no default either, Polygraph prompts.

The same rules apply when Polygraph reconstructs a session on another machine. `polygraph session start` follows the same idea: a configured default agent launches without asking, and no default means the session prompts for an agent.
