Skip to content

Sessions and checkpoints ​

Oibre saves each conversation as a session after each turn. Sessions are scoped to the working directory and stored under ~/.oibre/sessions/<working-directory>/<id>.json (under OIBRE_HOME if set). They contain messages, a name, the last model, working time, and per-model usage. The first prompt supplies the initial name unless you name the session with /rename or -n. Sessions also retain their reasoning effort and session-scoped resources.

Session files and checkpoints may contain prompts, replies, and project contents. Treat them as sensitive local data and protect access to your account and Oibre home directory.

Start, find, and resume ​

Run these commands from the same project directory:

sh
oc -n "refactor auth"             # start a named session
oc sessions                       # list sessions and usage per model
oc -c                             # continue the most recently active session here
oc -r "refactor auth"             # resume by name, ID, or unique ID prefix
oc -r "refactor auth" -m ollama/qwen3:8b
oc -p -r "refactor auth" "summarize our progress"

--continue is the long form of -c. When resuming from the command line, an explicit -m overrides the session's saved model. Resuming replays the conversation into the transcript and restores its model; the agent continues with the full retained history. The status bar shows the session title and total tokens.

Inside the UI:

CommandAction
/newStart a new session; the current one remains saved
/resume [name | id]Switch to a saved session, or open a picker without an argument
/rename [title]Rename this session, or edit its current name without an argument
/delete [name | id]Delete a session after confirmation; without an argument, delete the current session
/forkCopy this session and continue in the new one, with separate usage totals
/clearClear the current conversation while retaining its name and token statistics
/session [info | delete | pin]Inspect details and usage, delete, or pin a session
/export [path]Export the conversation to Markdown

/compact [focus] summarizes older turns to free context while keeping the last two prompts verbatim. /context shows the space occupied by the system prompt, tool schemas, and messages. Clearing, compaction, and rewinding can change the number of user turns retained in the conversation.

Activity and usage ​

Use /session info for session details, or /stats for an activity and usage panel. Other scopes are:

text
/stats session
/stats session refactor auth
/stats workspace
/stats global

Session stats include activity such as prompts, replies, tool calls and failures, tools used, changed files, working time, and usage by provider/model. Workspace stats cover the current folder; all aliases workspace. Global stats group saved sessions by workspace folder. oc sessions lists sessions for the current directory with token usage per model.

Successful provider calls count as requests even if the provider omits usage. Token totals include only reported usage, and reported input tokens count the entire context sent on each request, so input totals tend to grow as a conversation gets longer. If the latest request omits usage, context size is unavailable. USD cost is shown only when reported by the provider; missing cost data, including partial totals, is marked unavailable. Child and compaction calls count too. A fork begins with its own usage totals rather than inheriting the original's totals.

Checkpoints and rewind ​

Before each prompt, oc snapshots the working directory in a private Git store under ~/.oibre/checkpoints/<project>. This does not modify your repository's .git, including its HEAD, index, refs, and config. The working directory need not itself be a Git repository, but the git executable must be available. Checkpoints are unavailable when the working directory is the home directory or a filesystem root.

To return to an earlier prompt:

  1. Run /checkpoints to see session turns and the files they changed.
  2. Run /rewind, or press Esc twice on an empty input, and select an earlier prompt.
  3. Choose Restore code and conversation, Restore conversation only, or Restore code only.

Restoring both rewrites edited files, deletes files created since the snapshot, and recreates deleted files. It cuts the conversation back to before the selected prompt and puts that prompt back in the input so you can edit and resend it. Conversation-only restore leaves files untouched; code-only restore leaves the conversation intact. A card lists changed files. /undo reverses the last rewind, restoring files and conversation.

Checkpoints are not a complete backup

Snapshots honor ignore rules and skip node_modules, virtual environments, nested repositories and submodules, and files larger than 10 MB. A snapshot is refused if more than 20,000 candidate files would be stored. Snapshots are pruned after 14 days. Ignored, oversized, and nested-repository files cannot be restored, and external side effects such as package installation, database changes, and network calls are not undone. Keep independent backups and review the changes before relying on rewind.

For prompt entry and shortcuts, see Interactive use. The slash command reference covers all built-in commands.