What's a Session?
A session = one conversation with Claude. It remembers everything: what you asked, what Claude did, what files changed, how much it cost. It's saved to disk automatically. You never lose work.
The Basics
Starting a Session
Just type a prompt. That's it. A new session is created automatically with a random name like "brave-falcon".
Naming Your Session
Give it a real name so you can find it later:
/rename-- type this in the prompt while inside a sessionctrl+r-- keybind shortcut, works anywhere
Name sessions after what you're working on: "auth-refactor", "fix-login-bug", "add-dark-mode".
Switching Sessions
/sessions-- opens the session picker (also/resumeor/continue)- Type to search by name
- Arrow keys to select, enter to switch
Starting Fresh
/new-- start a brand new session (also/clear)
The Workflow
You sit down Monday morning:
opencode -c <- picks up where you left off Friday
You get pulled into a bug:
/new <- fresh session > fix the crash in auth <- work the bug /rename <- call it "auth-crash-fix"
Bug's fixed, back to your feature:
/sessions <- open the picker search "dark" <- find your "add-dark-mode" session enter <- you're back, full context intact
End of day, close terminal. Everything is saved.
CLI Shortcuts
| Command | What it does |
|---|---|
opencode | Start fresh on the home screen |
opencode -c | Resume your most recent session |
opencode -s ses_abc123 | Jump to a specific session by ID |
opencode session list | List all sessions in the terminal |
opencode session list --format json | List sessions as JSON (for scripting) |
Slash Commands
| Command | What it does |
|---|---|
/sessions | Open the session picker |
/resume | Same as /sessions |
/continue | Same as /sessions |
/new | Start a new session |
/clear | Same as /new |
/rename | Rename the current session |
Keybinds
| Key | What it does |
|---|---|
ctrl+r | Rename session |
session_list keybind | Open session picker |
Tips
Name your sessions.
"brave-falcon" means nothing in 3 days. "refactor-api-routes" does.
One task per session.
Don't mix unrelated work. Start a /new session for each distinct task.
Use -c habitually.
If you're continuing yesterday's work, opencode -c saves you from hunting through the picker.
Sessions are per-project.
Different git repos have separate session lists. You won't see your frontend sessions when working in the backend repo.
Context compaction is automatic.
If a conversation gets long, older messages get summarized to free up the context window. Your session keeps working, it just condenses the history.
You can delete sessions.
In the /sessions picker, hit the delete keybind twice (confirmation required) to remove sessions you don't need.
Sessions track costs.
Each session records token usage and cost per message, so you can see how expensive a conversation was.
Mental Model
Think of sessions like browser tabs for conversations. Each tab has its own history, its own context, its own state. You can have many open, switch between them, close ones you don't need, and name them so you can find them later. The difference: these tabs survive closing the terminal.
END OF DOCUMENT