view source

Octomind Sessions, Context Compression, Logs

skill

Where Octomind keeps config, sessions and logs; how sessions are named, resumed and compressed (context compression); common failures and their fixes.

Apache-2.0 Requires: octomind binary on PATH; zstd to read session files. macOS/Linux/Windows.

agents that use this skill

instructions

Overview

Users ask where Octomind keeps its files, how sessions are stored, named, resumed and compressed, how to read a session file or log, and why a run failed. This skill gives exact paths, formats, commands and failure causes. Flags and slash commands are in octomind-cli; config keys, including the compression keys, in octomind-config.

Mental model

All durable state sits under one data root. A session is one append-only file in it. Compression adds markers to that file and copies the folded messages to a separate archive, so nothing is lost.

Rules

Data root

The data root is ~/.local/share/octomind on Linux and macOS and %LOCALAPPDATA%\octomind on Windows. OCTOMIND_DATA_DIR replaces it; an empty value counts as unset. Paths below are relative to it. Sockets for octomind send live outside it, in $XDG_RUNTIME_DIR/octomind or <system tmp>/octomind-<uid>.

PathHoldsSafe to delete
config/config.tomlMain config. Every other *.toml in config/ is merged into it; mcp-<server>.toml holds MCP servers added at runtimeNo
config/config.toml.v<N>.<hash>.bakBackup written before a config upgrade; not merged, since it is not .tomlYes, once the upgrade is confirmed good
config/.envUser-scope API keys, written by octomind login and octomind configureOnly if you accept losing the keys
config/auth.json, keystore.jsonSign-in tokens; OAuth tokens of MCP serversYes; you sign in or authorize again
sessions/<name>.jsonl.zstOne sessionPer file; that session cannot be resumed afterwards
sessions/titles.jsonTitles, role and model per sessionYes; titles are lost
sessions/archive/<name>/Messages folded away by compressionYes, but recall then fails for that session
inputs.tomlAnswers to {{INPUT:KEY}} prompts of tap agentsYes; Octomind asks again
taps.toml, taps/<user>/octomind-<repo>/Tap list and clones or linksUse octomind untap instead
personal-tap/Your own local tap; never refreshed from GitNo, it is the only copy
agents/<tag>.<tap>.tomlCache of agent manifestsYes
logs/, cache/, history/, guardrails/ACP and WebSocket logs, trigger embeddings, prompt input history per role, guardrail script copiesYes; stop ACP and server processes first
plugins/, plugin-data/<name>/Plugin programs and their own dataplugins/ yes; plugin-data/ no

Do not open .env, auth.json, keystore.json or inputs.toml; name the path and the variable instead. Keys come from the process environment, overridden by config/.env, overridden by a .env in the launch directory. OCTOMIND_CONFIG_PATH moves config.toml and its sibling files but not config/.env.

Sessions

Naming. A generated name is YYMMDD-<folder>-HHMM-<id> in local time: <folder> is the working directory's name and <id> the first four characters of a UUID. --name NAME replaces it, creating the session or resuming it when the file exists. The name is the file name without .jsonl.zst.

Storage. The file is a series of independent zstd frames, one JSON line each, synced on every append. The first line is a SUMMARY with session_info (model, role, cost, tokens). Conversation messages are lines with role and content. Marker lines carry a type, such as COMPRESSION_POINT, KNOWLEDGE_ENTRY, COMMAND (runtime commands like /model), PLAN_SNAPSHOT and STATS. Read one with zstd -dc <file>; it includes messages a later compression folded away. Read one only when the user asks; it holds whole conversations.

Resume.

  • --resume NAME needs an existing file. Bare --resume opens a picker and fails without a terminal.
  • --resume-recent takes the newest file, by modification time, whose name contains -<folder>- for the current folder. A session created with a custom --name that lacks that segment is not found, and two projects with the same folder name share candidates.
  • Restored: messages as of the last compression, the saved role (an explicit tag switches it), model and effort, kept knowledge entries, the latest plan and schedule, cost and token totals, read-only mode.
  • Not restored: running processes, monitors, MCP connections, /loglevel, --schema.
  • A frame cut short at the end of the file, left by a crash, is trimmed when the session loads. A damaged frame elsewhere is an error.

List and rename. /list [PAGE] shows 15 sessions per page with name, title, creation time, model, tokens and cost. /rename TITLE sets a display title (160 characters at most) in titles.json; with no argument it clears it. File name and --resume name stay the same. /new [TITLE] starts a new session.

Compression

Compression keeps a long session inside the model's context window and cuts cost. When the full context passes compression.threshold, shipped at 120000 tokens, Octomind may fold older exchanges into a summary written by the compression model. The newest exchange stays word for word. The summary cites folded blocks by id, such as b:1a2b3c4d, and points to an archive.

  • Archive. Folded messages are copied unchanged to sessions/archive/<name>/<compression-id>.jsonl (plain JSONL, not zstd), with a .blocks.jsonl index beside it.
  • recall. The model passes up to 2 block ids per call and gets the original text back. It is offered when compression.attention.enabled or compression.attention.governance.enabled is true; governance is on by default. It errors before the first fold and for an unknown id.
  • /done [INSTRUCTIONS] forces a fold at a task boundary, skipping thresholds, cooldowns and cost checks. The outcome is compressed, nothing to compress, or failed. It keeps no injected skills.
  • compression.idle, on by default: a message sent after the provider's prompt cache expired triggers a fold first, if the cost math says that saves money.
  • A hard ceiling, the lower of max_session_tokens_threshold (shipped 300000) and the model's usable window, forces a fold shortly before it is reached.
  • cache_keepalive_enabled, off by default, sends cache read pings at 0.9 times the cache lifetime while the session waits; the number of pings is priced, not configured.

A resumed session starts from the last compression marker. /info shows runs, messages removed and tokens saved.

Logs

RunWhere output goesLevel
octomind runTerminal. Setting RUST_LOG also starts a tracing subscriber on stderrRoot key log_level (none, info, debug; shipped info); RUST_LOG filters tracing
octomind acp, octomind serverlogs/acp-debug.log (errors also as JSON lines in logs/acp-errors.jsonl), logs/websocket-debug.loglog_level, overridden by RUST_LOG

Raise the level for one session with /loglevel debug; it is never saved. To persist it, run octomind config --log-level debug or set log_level = "debug" before any table header. ACP and server processes read the level at start, so restart them.

Troubleshooting

SymptomCauseFix
model must be in provider:model formatModel set without a provider prefixoctomind config --model octohub:auto, or the form /model provider:model
Provider error that an API key was not found, naming the variableThe key is in none of the process environment, config/.env or the launch directory .envSet it in one of those. A stale OCTOHUB_API_KEY in a project .env beats a fresh octomind login
Failed to parse TOML file: <path>Invalid TOML in a file of the config directory; a stray .toml copy there is merged tooFix the named file; keep backups outside the directory or with another suffix
Failed to parse merged TOML configurationA required field is missing after mergingoctomind config --validate; it also names range errors, such as timeout_seconds outside 1 to 3600
Config value ignoredA scalar key placed after a nested table header, such as [compression.model], belongs to that tableMove scalar keys above the nested tables
An MCP server's tools are missingThe server failed to start; the session continues without it, and the error is logged only at debug level. A server that failed at startup is not restarted/mcp health, /loglevel debug, check the command is on PATH, then start a new session
Failed to fetch agent manifest for '<tag>' from all taps, or There is no agent '<tag>'Tag not in any tap, misspelled variant, or a manifest at agents/<ns>.toml instead of agents/<ns>/default.toml (the message names the path to move it to)octomind tap lists taps. A tag is lowercase letters, digits and hyphens. A same-named local role wins over a tap agent
Edited agent behaves as beforeA cached manifest in agents/ is served for cache_ttl_hours (shipped 24), also for local taps. GitHub taps refresh at most every 15 minutesDelete that file in agents/
Capability '<name>' skipped — set KEY to enable itA key the capability needs is unset or emptySet it in .env, start a new session
Stopped: session spending threshold reached or request, exit code 75max_session_spending_threshold or max_request_spending_threshold (USD, 0.0 disables) was crossed in a piped or daemon runRaise the key, or continue with --resume. A terminal asks y/N for the session limit; the request limit stops without asking
Session '<name>' not found. Cannot resume non-existent session., or --resume requires a session name in non-interactive modeWrong name, or bare --resume without a terminal/list, or look in sessions/; pass the name

Config upgrade and recovery

Octomind upgrades config.toml at startup when its version stamp lags the binary, before any command runs, including config --show and config --validate. octomind config --upgrade runs the same upgrade on <data-root>/config/config.toml. Passing -c KEY=VALUE skips the automatic check.

Before rewriting, Octomind saves the old bytes as config.toml.v<old version>.<8 hex digits>.bak beside the file. A sibling .toml file that an upgrade step edits gets its own .bak. Messages go to stderr: Upgrading config from version A to B..., then Config upgraded successfully! Backup saved to: <path>. A result that is not valid TOML aborts the upgrade, and the replacement is atomic.

To recover:

  1. Stop running sessions.
  2. Copy the .bak over config.toml, or restore a whole-directory copy you made by hand.
  3. Starting the same binary upgrades the file again. Fix the cause first, or run the older binary that matches the backup.
  4. Never edit version to skip or force a step. A config newer than the binary is rejected with configuration version N is newer than this ... binary supports.
  5. Run octomind config --validate.

Checks

octomind config --validate validates the merged config and exits non-zero on errors. octomind config --show prints the loaded settings; its path heading always shows the data-root default, so it does not confirm OCTOMIND_CONFIG_PATH. octomind vars prints prompt placeholders and their values. octomind tap lists active taps. In a session, /info, /mcp health and /list.

Examples

Read a session without resuming it:

bash
DATA="${OCTOMIND_DATA_DIR:-$HOME/.local/share/octomind}"
zstd -dc "$DATA/sessions/feature-auth.jsonl.zst" | less

A config that broke after an upgrade:

bash
DATA="${OCTOMIND_DATA_DIR:-$HOME/.local/share/octomind}"
ls "$DATA/config"/*.bak
cp "$DATA/config/config.toml.v<N>.<hash>.bak" "$DATA/config/config.toml"
octomind config --validate

Checklist

  • Paths are relative to the data root, and OCTOMIND_DATA_DIR is mentioned when the user moved it?
  • No secret file was opened or quoted?
  • The failure message was matched to a row above, with its cause confirmed against the user's output?
  • A recovery step names the backup path that Octomind printed?

References

  • Octomind docs, served at https://octomind.run/docs/: Sessions (usage/05-sessions.md), Compression (usage/08-compression.md), Common Issues (troubleshooting/01-common-issues.md), Migration Guide (troubleshooting/02-migration-guide.md) and Session Commands (02-session-commands.md in the reference section).
  • Sibling skills: octomind-cli, octomind-config, octomind-runtime, octomind-supervisor.