> sessions

A session is a saved conversation with its own history and context. Start one interactively with cursor-agent, seed it with a prompt, and resume it later by latest, by list, or by a specific id. Forking and clearing let you branch or reset without losing the thread you care about.

// sessions

5 commands

// faq

How do I resume my last Cursor CLI conversation?

Run cursor-agent resume to reopen the most recent chat with full context, or cursor-agent --continue, which is an alias for --resume=-1. To pick an older thread, run cursor-agent ls and choose from the list. Inside a session the /resume slash command opens the same picker.

How do I resume a specific session in a script?

Pass its id: cursor-agent --resume="<chat-id>". Get the id from cursor-agent ls, from the /copy-conversation-id slash command, or from the session_id field returned by --output-format json. Quoting with the = form avoids the bare --resume falling back to the interactive picker.

What is the difference between /clear and /fork?

/clear starts a brand-new session and drops the current context (aliases /new, /new-chat, /newchat). /fork branches the current chat into a separate session while preserving its history, so you can chase a tangent without polluting the original thread.

Where are my chat sessions stored?

Sessions are stored by Cursor and tied to your account, which is why they sync between the CLI, the editor, and cursor.com/agents. That also means resuming works across machines once you are logged in, and cursor-agent ls lists the same history everywhere.