Troubleshooting
somtum doctor reports breakeven_ratio below 1.5x
This warning means somtum is spending more tokens (injecting memories) than it's saving.
Normal for small projects. With fewer than ~20 memories and rare recall calls, the overhead of injection outweighs the benefit. The ratio improves naturally as the memory store grows.
Check for the hybrid/embeddings mismatch. If doctor shows strategy=hybrid but embeddings: disabled, somtum is silently falling back to BM25 while paying hybrid overhead:
✓ config strategy=hybrid, k=8
✓ embeddings disabledFix: align the strategy with what's actually running.
# Option 1 — use BM25 (offline, no API key needed)
somtum config set retrieval.strategy bm25
# Option 2 — enable full hybrid (downloads a 30 MB ONNX model, needs ANTHROPIC_API_KEY)
somtum config set retrieval.embeddings.enabled true
somtum reindexRun somtum doctor again to confirm both config and embeddings lines are consistent.
somtum stats shows memories 0 after a session
Check the hook log first:
cat ~/.somtum/hook.logclaude CLI not found and no ANTHROPIC_API_KEY set
- If you use Claude Code: run
which claude— if nothing prints, reinstall Claude Code or add its binary to yourPATH. - If you prefer the direct API: add
export ANTHROPIC_API_KEY="sk-ant-..."to~/.zshrcand runsource ~/.zshrc. Must be in your profile, not just exported in the current terminal tab.
Run somtum doctor — the api_key check tells you exactly which backend is available.
Hook not installed in the right directory
somtum init writes the hook to .claude/settings.json in the directory where you ran it. If you launch Claude Code from a different directory, it reads a different settings file.
Fix: run somtum init from the same directory you use to launch Claude Code.
cd ~/my-project
somtum init
claude # must be launched from ~/my-projectShort or trivial session
If the session had no decisions, bug fixes, or learnings (e.g. you just asked Claude to say hello), the extractor correctly returns 0 observations.
somtum serve opens the browser but shows "Connection refused"
This was a bug fixed in v1.1.0. Upgrade:
npm install -g somtum@latestIf you installed from source, rebuild:
pnpm buildsomtum serve — port already in use
somtum serve --port 3001Agent appears to keep running after session ends
The SessionEnd hook has a hard 90-second timeout. If sessions appear stuck, verify you are on v1.1.0+:
somtum --version
tail -20 ~/.somtum/hook.logInstallation fails (node-gyp / better-sqlite3)
Ensure build tools are installed:
- macOS:
xcode-select --install - Ubuntu/Debian:
sudo apt-get install build-essential python3 - Windows:
npm install --global --production windows-build-tools
Embeddings are slow or the model won't download
The first somtum reindex downloads a ~30 MB ONNX model from Hugging Face. This requires internet access. Subsequent runs use the cached model.
On an air-gapped machine or if you prefer not to use embeddings:
somtum config set retrieval.embeddings.enabled false
somtum config set retrieval.strategy bm25BM25 works fully offline and is fast at any corpus size.
Claude doesn't have context from previous sessions
Auto-inject is the first thing to check. Since v1.3.0, Somtum automatically injects top-k memories into every UserPromptSubmit via the cache hook — no manual recall step needed.
- Confirm the cache hook is installed:
somtum doctor→ look forhooks_installed ✓ - If not installed:
somtum init --cache(orsomtum init --all) - Confirm injection is enabled:
somtum config get injection.enabled→ should betrue - Check that memories actually exist:
somtum stats→memories > 0 - Look for the budget line at the top of each prompt context:
[somtum] injected N/M memories (~X tokens). If you see0/M, BM25 found no matches — try a more descriptive prompt or lowerinjection.min_relevance_scoreto0.
Using the MCP server (somtum init --all), Claude can also call recall directly when uncertain. If it's not happening:
- Confirm
.mcp.jsonexists:cat .mcp.json - Restart Claude Code to pick up the MCP config
Stale memory warning in somtum doctor
doctor warns when memories are older than 90 days with no confirmed retrievals — observations that have never come up in a search. Options:
# Review them before deciding
somtum search "old topic"
# Promote useful ones to workspace scope
remember("...", scope="workspace")
# Remove irrelevant ones
somtum purge --older-than 90dStarting fresh — wiping all memories
To hard-reset a project's memory (irreversible):
somtum reset
# Permanently delete all memories for this project? [y/N] yTo soft-delete everything (recoverable via somtum export --include-deleted):
somtum forget --all