Skip to content

M31A records conversations locally so you can resume work, search past sessions, and rewind changes. Conversation records are written by chatRecordingService.ts; a local SQLite index supports session search.

Starting and resuming sessions ​

bash
m31a --resume latest
m31a --resume 5
m31a --session-file /path/to/session.json
m31a --session-id my-custom-id
m31a --list-sessions
m31a --delete-session 3

--resume, --session-id, and --session-file are mutually exclusive. --prompt-interactive executes a prompt and then stays in the interactive UI.

In-app, use:

  • /chat list|save|resume|delete|share|checkpoints,
  • /resume to pick a session,
  • /clear (alias /new) to start a new session,
  • /export-session to write a session record to disk.

Checkpoints and rewind ​

Checkpointing records file state so you can restore earlier points in a session. Enable it with:

json
{
  "general": {"checkpointing": {"enabled": true}}
}

Use /chat checkpoints to list them, /rewind to return to one, and /restore to restore files. Checkpoint changes are stored with the session record by chatRecordingService.ts.

Session retention ​

general.sessionRetention controls automatic cleanup:

KeyDefaultMeaning
enabledtrueEnable cleanup.
maxAge30dDelete chats older than this period.
maxCountunsetKeep at most this many recent sessions.
minRetention1dSafety floor for retention.

Context compression ​

As the conversation grows, M31A compacts history automatically. The core chatCompressionService.ts triggers at a fraction of the context window and protects the most recent turns; retrieval tools can be exempted from collapse.

json
{
  "model": {
    "compressionThreshold": 0.5,
    "maxSessionTurns": -1,
    "summarizeToolOutput": {}
  },
  "contextManagement": {
    "historyWindow": {"maxTokens": 150000, "retainedTokens": 40000},
    "messageLimits": {
      "normalMaxTokens": 2500,
      "retainedMaxTokens": 12000,
      "normalizationHeadRatio": 0.25
    }
  }
}

Manual controls: /compress (aliases /summarize, /compact) and /context-window. The PreCompress hook event runs before compaction.

Workspace memory (M31A.md) ​

M31A discovers M31A.md files as durable instructions. The discovery walk stops at configured boundary markers (.git by default). Use /init to create a starter file, /memory show to inspect loaded memory, and /memory reload to refresh it. See Configuration for the related settings.

Including extra directories ​

bash
m31a --include-directories ../lib,../shared

Or set context.includeDirectories in settings. Missing directories are skipped, and context.loadMemoryFromIncludeDirectories controls whether their M31A.md files are scanned on reload.

Next steps ​

Built with VitePress. Powered by NVIDIA NIM.