# Resume Conversations

> How to resume previous conversations in the OpenHands CLI

## Overview

OpenHands CLI automatically saves your conversation history in `~/.openhands/conversations`. You can resume any previous conversation to continue where you left off.

## Listing Previous Conversations

To see a list of your recent conversations, run:

```bash  theme={null}
openhands --resume
```

This displays up to 15 recent conversations with their IDs, timestamps, and a preview of the first user message:

```
Recent Conversations:
--------------------------------------------------------------------------------
 1. abc123def456 (2h ago)
    Fix the login bug in auth.py

 2. xyz789ghi012 (yesterday)
    Add unit tests for the user service

 3. mno345pqr678 (3 days ago)
    Refactor the database connection module
--------------------------------------------------------------------------------
To resume a conversation, use: openhands --resume <conversation-id>
```

## Resuming a Specific Conversation

To resume a specific conversation, use the `--resume` flag with the conversation ID:

```bash  theme={null}
openhands --resume <conversation-id>
```

For example:

```bash  theme={null}
openhands --resume abc123def456
```

## Resuming the Latest Conversation

To quickly resume your most recent conversation without looking up the ID, use the `--last` flag:

```bash  theme={null}
openhands --resume --last
```

This automatically finds and resumes the most recent conversation.

## How It Works

When you resume a conversation:

1. OpenHands loads the full conversation history from disk
2. The agent has access to all previous context, including:
   * Your previous messages and requests
   * The agent's responses and actions
   * Any files that were created or modified
3. You can continue the conversation as if you never left

<Note>
  The conversation history is stored locally on your machine. If you delete the `~/.openhands/conversations` directory, your conversation history will be lost.
</Note>

## Resuming in Different Modes

### Terminal Mode

```bash  theme={null}
openhands --resume abc123def456
openhands --resume --last
```

### ACP Mode (IDEs)

```bash  theme={null}
openhands acp --resume abc123def456
openhands acp --resume --last
```

For IDE-specific configurations, see:

* [Zed](/openhands/usage/cli/ide/zed#resume-a-specific-conversation)
* [Toad](/openhands/usage/cli/ide/toad#resume-a-conversation)
* [JetBrains](/openhands/usage/cli/ide/jetbrains#resume-a-conversation)

### With Confirmation Modes

Combine `--resume` with confirmation mode flags:

```bash  theme={null}
# Resume with LLM-based approval
openhands --resume abc123def456 --llm-approve

# Resume with auto-approve
openhands --resume --last --always-approve
```

## Tips

<Tip>
  **Copy the conversation ID**: When you exit a conversation, OpenHands displays the conversation ID. Copy this for later use.
</Tip>

<Tip>
  **Use descriptive first messages**: The conversation list shows a preview of your first message, so starting with a clear description helps you identify conversations later.
</Tip>

## Storage Location

Conversations are stored in:

```
~/.openhands/conversations/
├── abc123def456/
│   └── conversation.json
├── xyz789ghi012/
│   └── conversation.json
└── ...
```

## See Also

* [Terminal Mode](/openhands/usage/cli/terminal) - Interactive CLI usage
* [IDE Integration](/openhands/usage/cli/ide/overview) - Resuming in IDEs
* [Command Reference](/openhands/usage/cli/command-reference) - Full CLI reference


---

> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.openhands.dev/llms.txt