Sessions and history
Durable sessions
Every session is a durable JSONL log under $OMDSH_HOME/sessions, falling back to $DSH_HOME and then ~/.dsh. The logs are the source of truth for replay, projections, and search.
omdsh --resume <session-id>reopens a session from the shell; the secondCtrl+Cprints that command with the id when the session can be resumed./resumeopens a searchable selector with the latest human-message preview, age, event count, and completion state;/resume <session-id>skips the selector./newstarts a clean session rather than branching the current one./retrysubmits the latest human prompt again as a new turn.Esctwice opens the conversation-turn selector: choosing a user turn branches a new session from the history before that message and restores the original prompt into the composer. The original session stays available through/resume, so rewind is recoverable rather than destructive.
See Recover and manage a long session for the walkthrough.
Session Library
/sessions opens the Session Library, the resume list with pin and rename actions: p pins a session and r renames it. Pins and names are stored in $OMDSH_HOME/omdsh/session-library.json.
/sessions <query> searches durable session content instead, through the session-query index β SQLite FTS5, built in memory on the first search of a run β and resumes the chosen hit. The search covers the full session log, so matches inside compacted or collapsed history still count.
Logs on disk
Session files may be compressed and carry integrity checks, so do not edit them by hand; keep using omdsh for those sessions. A log written by an earlier release is migrated when the session is written to, and once per session format by a background pass on the first launch after an upgrade, which publishes a version-named successor (session.v4.jsonl[.zstd]) beside the unchanged predecessor. A single startup notice reports how many sessions that pass upgraded.
Sessions first created with v0.5.0 through v0.11.0 may contain the private omdsh/tools-selected event: current omdsh recognizes and resumes them, but an unmodified DSH persistence reader refuses that log. Sessions created with v0.12.0 and later do not write the event, so newly created sessions stay loadable by stock DSH persistence.
Local files
All of these live under the same home ($OMDSH_HOME, else $DSH_HOME, else ~/.dsh):
| Path | Contents |
|---|---|
sessions/ | The durable session logs. |
omdsh/history.jsonl | Prompt history behind Ctrl+R. |
omdsh/keybindings.json | Application keybinding overrides. |
omdsh/model-favorites.json | The favorite model cycle behind Ctrl+P and Alt+P. |
omdsh/session-library.json | Session pins and renames. |
omdsh/recent-sessions.json | Session Library labels reused across launches; delete it to re-read every stored log. |
omdsh/sessions-upgraded.json | Records the session format the stored logs were upgraded to. |
sessions-query.sqlite | Derived full-text index behind session content search; delete it to rebuild on the next search. |
profiles/omdsh/ | The user plugin Profile managed by omdsh plugin, including the cordis.patch.yml that persists settings. |
Settings changed in /settings persist through that Profile patch, not a separate settings file.
Related
- Commands β
/sessions,/resume,/retry,/new, and/export - Recover and manage a long session β resume, rewind, compact, and export
- User plugins β the Profile directory and
omdsh plugin