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.
{
"session": {
"heartbeat_interval_ms": 15000,
"command_timeout_ms": 30000,
"max_payload_bytes": 1048576,
"safe_partition_max_concurrency": 10,
"checkpoint_auto_before_run": true
}
}| Field | Type | Default Value | Description |
|---|---|---|---|
heartbeat_interval_ms | int | 15000 | Host session heartbeat interval (milliseconds) |
command_timeout_ms | int | 30000 | Host command execution timeout (milliseconds) |
max_payload_bytes | int | 1048576 | CRP maximum payload (1 MiB) |
safe_partition_max_concurrency | int | 10 | Maximum number of read-only tools that may run concurrently in one step |
mcp_local_max_concurrency | int | 3 | Per-server concurrency limit for local MCP servers |
mcp_remote_max_concurrency | int | 20 | Per-server concurrency limit for remote MCP servers |
disable_stream_tools_during_step | bool | false | Prevent tools from starting while the LLM response is streaming |
checkpoint_auto_before_run | bool | true | Attempt to create a checkpoint before each user turn |
max_concurrent_sessions | int | 10 | Maximum 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:
| Method | Description |
|---|---|
MOGICK_DATA_DIR environment variable | Set the data base; the effective database path also depends on profile and channel. See Data directories |
memory.db_path configuration field | Set 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:
export MOGICK_CONFIG_DIR=/home/user/.mogick
export MOGICK_DATA_DIR=/mnt/mogick-data
mogicklast-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 type | Content |
|---|---|
| Metadata | ID, title, summary, timestamp, status |
| Conversation history | User input, model output (including merged streaming output), and collapsed reasoning content |
| Tool calls | Name, parameters, result, duration, and projected summary |
| Permission decisions | Complete 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.
Related documents
- Session Management — How sessions are used, their lifecycle, and CLI commands
- Session Export Options — Export formats and modes
- Checkpoints and rollback
Path placeholders <config-dir> and <db-path> refer to the effective profile/channel paths; see Data directories.