Skip to main content

Commands at a glance


Browsing past sessions — /sessions

Up to 20 sessions are shown, newest first. The current session updates its elapsed time live. Turns is the total turn count; Investigations is how many of those were investigation turns.

Resuming a past session — /resume

Use /resume with the first characters of the session ID from /sessions:
From outside the REPL, pass the same ID or name substring to the CLI launcher (for example opensre --resume 9b2e4f7a, or o --resume OOM when o is your shell alias):
In a TTY, bare /resume opens an interactive picker of recent sessions. New turns after a resume append to that same session file — /resume does not create a duplicate entry in /sessions. To resume a specific branch point, append an entry ID prefix after the session ID:
When the branch contains a compaction entry, replay inserts the saved summary before the kept messages so the assistant has the compacted context. OpenSRE restores the conversation, shows the past exchanges, then lets you continue:
What gets restored: You can also search by name instead of ID:
If the prefix matches more than one session, OpenSRE asks you to be more specific.

When you exit

When you leave the REPL, OpenSRE prints your session ID so you can resume later: Example:
Copy the /resume … or opensre --resume … line from the terminal, or find the session later with /sessions.

Starting fresh with context — /new

/new closes the current session and opens a new one, but carries the conversation forward:
Use /new after a long session to keep /sessions tidy without losing your place in the conversation.

Compacting long sessions — /compact

/compact summarizes older conversation context, keeps the recent turns, and writes a durable compaction entry into the session file:
OpenSRE also compacts automatically before a shell turn when the replayed branch context grows past the runtime threshold. The compaction entry stores the summary, the first kept entry ID, and before/after size estimates so future /resume calls can replay the compacted branch. /new vs /clear:

What OpenSRE saves

Each session records:
  • When it started and ended, and how long it ran
  • Every message you sent and every response from the assistant
  • Tool calls, tool updates, tool results, model/tool changes, labels, custom messages, and compaction summaries
  • Infra context discovered during investigations (service names, cluster names, regions)
  • Turn counts for investigations and chats
Sessions are stored as files under ~/.opensre/sessions/. Each file is plain text and human-readable.

Privacy and what is not saved

  • Secrets or credentials — known token shapes are redacted from the prompt log by default (set OPENSRE_PROMPT_LOG_REDACT=0 to store raw text instead)
  • Full investigation results — stored separately under ~/.opensre/investigations/
  • Token usage — tracked in ~/.opensre/prompt_log.jsonl when prompt logging is enabled
See Interactive Shell Privacy for redaction controls.