Skip to content

Session and history settings ​

For session operations such as creating, listing, resuming, and exporting sessions, see Session management. This page covers only the fields in the session section of config.json.

Session persistence uses the database at <db-path> together with its companion <db-path>.payloads/ content directory. The database stores session records and content references, while some content is stored externally. The database file alone is not a complete session backup.

Configuration ​

Set these fields in <config-dir>/config.json globally or .mogick/config.json for the current project. The defaults are appropriate for most users.

json
{
  "session": {
    "heartbeat_interval_ms": 15000,
    "command_timeout_ms": 30000,
    "max_payload_bytes": 1048576,
    "safe_partition_max_concurrency": 10,
    "checkpoint_auto_before_run": true
  }
}
FieldTypeDefault ValueDescription
heartbeat_interval_msint15000Host session heartbeat interval (milliseconds)
command_timeout_msint30000Host command execution timeout (milliseconds)
max_payload_bytesint1048576CRP maximum payload (1 MiB)
safe_partition_max_concurrencyint10Maximum number of read-only tools that may run concurrently in one step
mcp_local_max_concurrencyint3Per-server concurrency limit for local MCP servers
mcp_remote_max_concurrencyint20Per-server concurrency limit for remote MCP servers
disable_stream_tools_during_stepboolfalsePrevent tools from starting while the LLM response is streaming
checkpoint_auto_before_runbooltrueAttempt to create a checkpoint before each user turn
max_concurrent_sessionsint10Maximum number of sessions loaded within a single Mogick process

max_concurrent_sessions only constrains a single process and does not coordinate multiple Mogick instances sharing the same database.

Storage location ​

The session database is at <db-path>, with companion content in <db-path>.payloads/. The database path depends on configuration, profile and release channel. Configure it using:

MethodDescription
MOGICK_DATA_DIR environment variableSet the data base; the effective database path also depends on profile and channel. See Data directories
memory.db_path configuration fieldSet an absolute database path in config.json; takes precedence over MOGICK_DATA_DIR

A common setup keeps configuration in the home directory and places the session database on external storage:

bash
export MOGICK_CONFIG_DIR=/home/user/.mogick
export MOGICK_DATA_DIR=/mnt/mogick-data
mogick

last-session.txt, which supports --continue, and the TUI prompt history follow the database directory. See Data directories and environment variables for the complete layout.

Stored data ​

Data typeContent
MetadataID, title, summary, timestamp, status
Conversation historyUser input, model output (including merged streaming output), and collapsed reasoning content
Tool callsName, parameters, result, duration, and projected summary
Permission decisionsComplete tool-approval records

Persisted tool content is distinct from content sent to the model. Persistence can involve both the database and its companion content directory; model input is subject to tool and context-processing limits and may be truncated. Do not back up only the database file; see Backup scope.

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