Skip to content

Session management ​

Mogick CLI persists each conversation as a session, so you can stop work and resume it later. By default, <db-path> stores conversation history, tool-call records, and permission decisions; change its location with MOGICK_DATA_DIR or memory.db_path. Starting mogick creates a new session, --resume <id> opens a specific session, and --continue opens the most recently active session. Session lists are sorted by activity time, and the model generates titles and summaries automatically.

Session lifecycle and status ​

Each session has an independent persistent state and runtime state. The persistent state controls availability and visibility, while the runtime state reflects activity in the current process.

Persistent stateDescription
activeAvailable for normal loading and interaction; the default working state
closedHistory is preserved, but the session cannot accept new input until reopened
archivedHidden from the default list; data remains intact and recoverable
Runtime stateDescription
foregroundReceives user input directly; only one session can be in the foreground at a time
backgroundDoes not receive terminal input, but continues to persist data

For example, an active session can be in the background after you switch away from it. Reopening a closed session makes it active and brings it to the foreground.

CLI commands ​

Use these commands for common session-management tasks:

CommandDescription
mogick sessions listList sessions for the current workspace, showing ID, title, persistence status and last updated time
mogick sessions createCreate a new blank session
mogick sessions rename <id> <name>Assign a custom name to make the session easier to find
mogick sessions delete <id>Delete the session and associated persistent records, including history; not a transition to closed. After success, the session cannot be resumed or exported
mogick sessions export <id>Export session data, supports multiple output formats
mogick sessions feedbackSubmit session usage feedback
mogick --resume <session-id>Resume the session with the specified ID
mogick --continueAutomatically resume the last active session without manually looking up the ID
Both options continue an existing conversation. --resume requires a session ID; --continue finds the most recently active session automatically.

Before deleting, verify the session ID and export history or back up data as needed. An exported transcript is not a complete, directly restorable backup. Deleting a session does not undo its workspace file changes or clear cross-session long-term memory. See Backup scope.

TUI operation ​

You can also manage sessions from the TUI.

OperationDescription
/sessionsOpen the session browser to search, filter by status, and switch sessions
/renameRename the current session
/newCreate a blank session and retain the current session in the background

You can also expand the /sessions list and rename a session there. The session browser's right pane shows the selected session's title, summary, ID, working directory, context-window usage, and cache hit rate. Use this information to identify the session you want to resume.

Session export ​

Export readable conversation history or JSON with mogick sessions --json export <id>. See Session export for scope and limitations.

ACP multi-client support ​

ACP supports concurrent connections from multiple clients. A host can inject MCP configuration through session/new, giving each client an independent session and MCP resource set. When a session is closed, archived, or deleted, Mogick cleans up its associated MCP resources automatically.

Multiple ACP clients can connect to one Mogick instance while keeping their session state and MCP configuration isolated. This supports multi-client workflows and automated orchestration.

Storage and backups ​

Sessions use the effective profile/channel database. A complete backup may also require payload files, runtime state, settings and workspace files. See Data directories and backup scope. Resuming restores saved history and settings, not an identical in-memory context or external environment.

Path placeholders <config-dir> and <db-path> refer to the effective profile/channel paths; see Data directories.