Octomind Sessions, Context Compression, Logs
skillWhere Octomind keeps config, sessions and logs; how sessions are named, resumed and compressed (context compression); common failures and their fixes.
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>.
| Path | Holds | Safe to delete |
|---|---|---|
config/config.toml | Main config. Every other *.toml in config/ is merged into it; mcp-<server>.toml holds MCP servers added at runtime | No |
config/config.toml.v<N>.<hash>.bak | Backup written before a config upgrade; not merged, since it is not .toml | Yes, once the upgrade is confirmed good |
config/.env | User-scope API keys, written by octomind login and octomind configure | Only if you accept losing the keys |
config/auth.json, keystore.json | Sign-in tokens; OAuth tokens of MCP servers | Yes; you sign in or authorize again |
sessions/<name>.jsonl.zst | One session | Per file; that session cannot be resumed afterwards |
sessions/titles.json | Titles, role and model per session | Yes; titles are lost |
sessions/archive/<name>/ | Messages folded away by compression | Yes, but recall then fails for that session |
inputs.toml | Answers to {{INPUT:KEY}} prompts of tap agents | Yes; Octomind asks again |
taps.toml, taps/<user>/octomind-<repo>/ | Tap list and clones or links | Use octomind untap instead |
personal-tap/ | Your own local tap; never refreshed from Git | No, it is the only copy |
agents/<tag>.<tap>.toml | Cache of agent manifests | Yes |
logs/, cache/, history/, guardrails/ | ACP and WebSocket logs, trigger embeddings, prompt input history per role, guardrail script copies | Yes; stop ACP and server processes first |
plugins/, plugin-data/<name>/ | Plugin programs and their own data | plugins/ 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 NAMEneeds an existing file. Bare--resumeopens a picker and fails without a terminal.--resume-recenttakes the newest file, by modification time, whose name contains-<folder>-for the current folder. A session created with a custom--namethat 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.jsonlindex beside it. recall. The model passes up to 2 block ids per call and gets the original text back. It is offered whencompression.attention.enabledorcompression.attention.governance.enabledis 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
| Run | Where output goes | Level |
|---|---|---|
octomind run | Terminal. Setting RUST_LOG also starts a tracing subscriber on stderr | Root key log_level (none, info, debug; shipped info); RUST_LOG filters tracing |
octomind acp, octomind server | logs/acp-debug.log (errors also as JSON lines in logs/acp-errors.jsonl), logs/websocket-debug.log | log_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
| Symptom | Cause | Fix |
|---|---|---|
model must be in provider:model format | Model set without a provider prefix | octomind config --model octohub:auto, or the form /model provider:model |
| Provider error that an API key was not found, naming the variable | The key is in none of the process environment, config/.env or the launch directory .env | Set 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 too | Fix the named file; keep backups outside the directory or with another suffix |
Failed to parse merged TOML configuration | A required field is missing after merging | octomind config --validate; it also names range errors, such as timeout_seconds outside 1 to 3600 |
| Config value ignored | A scalar key placed after a nested table header, such as [compression.model], belongs to that table | Move scalar keys above the nested tables |
| An MCP server's tools are missing | The 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 before | A cached manifest in agents/ is served for cache_ttl_hours (shipped 24), also for local taps. GitHub taps refresh at most every 15 minutes | Delete that file in agents/ |
Capability '<name>' skipped — set KEY to enable it | A key the capability needs is unset or empty | Set it in .env, start a new session |
Stopped: session spending threshold reached or request, exit code 75 | max_session_spending_threshold or max_request_spending_threshold (USD, 0.0 disables) was crossed in a piped or daemon run | Raise 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 mode | Wrong 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:
- Stop running sessions.
- Copy the
.bakoverconfig.toml, or restore a whole-directory copy you made by hand. - Starting the same binary upgrades the file again. Fix the cause first, or run the older binary that matches the backup.
- Never edit
versionto skip or force a step. A config newer than the binary is rejected withconfiguration version N is newer than this ... binary supports. - 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:
DATA="${OCTOMIND_DATA_DIR:-$HOME/.local/share/octomind}"
zstd -dc "$DATA/sessions/feature-auth.jsonl.zst" | lessA config that broke after an upgrade:
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 --validateChecklist
- Paths are relative to the data root, and
OCTOMIND_DATA_DIRis 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.mdin the reference section). - Sibling skills:
octomind-cli,octomind-config,octomind-runtime,octomind-supervisor.