🧠 Meet Mneme — one memory, every agent, that learns as you work

Every AI session normally starts cold — you re-explain the task and burn 20–50K tokens reloading context. Mneme (named for the Greek muse of memory) is the local brain at the heart of Termpolis: one shared memory that Claude, Codex, Gemini, and Qwen all read and write, that remembers across sessions and learns from each one, so you stop repeating yourself.

  • One memory, four agents. All four read and write the same store over the built-in MCP server. A fact one agent figures out is instantly recalled by the others — no copy-paste, no re-discovery.
  • It learns from every session. When an agent finishes a chunk of work, Termpolis quietly distills the lesson — the fix, the decision, the gotcha — plus its own track record into the brain, so the fleet gets smarter the more you use it. Automatic for Claude, Codex, and Gemini (from their session transcripts); Qwen records its own.
  • Every new agent starts warm. Open a fresh Codex or Gemini terminal and it already knows your project — the relevant memory loads at launch, behind the scenes, no wall of text.
  • 100% local & private. Embeddings run in-process (bundled bge-small-en-v1.5, WASM) — no server, no telemetry, nothing leaves your machine. Optional at-rest encryption (AES-256-GCM) and conflict-free sync across machines via a folder you already sync.
  • Built to trust. Content-addressed dedup (never stores the same thing twice), millisecond HNSW retrieval at scale, staleness-guarded recall, and an observable 🧠 Loaded N memories banner so you always know it fired.

Proven, not just claimed. A CI gate has one agent write a decision and a different agent recall it from a keyword-free paraphrase over the real MCP wire; semantic recall scores 0.97+ similarity on paraphrases. Backed by 7,000+ tests (97.5% statements / 98.5% lines).

The result: stop re-explaining context every session — and stop paying to reload it.


🆚 Why not just use Claude Code or Codex on their own?

Termpolis runs those exact CLIs, unchanged — and fixes the one thing they can't do alone: remember.

What you get Claude Code / Codex on their own The same agent inside Termpolis
Long-term memory Starts cold every launch; you re-explain and re-pay tokens to reload context Mneme — a local brain holding months of context, surviving restarts, recalled in ms
Shared across tools Siloed — Codex can't see what Claude just figured out All four agents read/write one memory; a fact one learns, the others recall
It learns No learning — every session is a blank slate Distills a lesson from every finished task + tracks its own competence
Every new session Re-explain your codebase from scratch Opens already knowing the project; one-click cross-agent handoff, no re-explaining
Your data & lock-in One vendor's account + cloud; telemetry varies 100% local, Apache-2.0, no account/backend; prompts scanned for secrets

Same agents, same accounts you already pay for — Termpolis is the workspace around them that remembers and learns.


🛡 AI Security Center — what it actually does

Honest framing first. Any tool that lets you talk to a hosted model (Claude, Codex, Gemini, Qwen) is, by definition, sending your prompt to that provider. Termpolis cannot air-gap a prompt you choose to send, cannot guarantee a provider's stated retention policy is enforced server-side, and cannot stop a provider from later changing their terms. If your threat model requires those guarantees, run a local model — but accept the quality + hardware trade-off that comes with it.

What Termpolis can do is make the hosted path substantially safer than typing into a stock terminal, a browser, or a VS Code plug-in:

Risk What Termpolis does Limit
Secret leaves the machine in a prompt Always-on prompt watch (v1.25.2) — no toggle, cannot be switched off. Every Enter / paste in an AI terminal is scanned against 97 rules: token shapes (AWS, GitHub PATs, Stripe, GCP, JWTs, PEM keys), named assignments in .env / appsettings.json / YAML / connection strings / URLs-with-credentials, and a contextual rule that catches the most human leak of all — "here is the api key for this code, add it to line 42: 8f3a9b2c…". Your text is forwarded untouched — nothing is withheld, nothing is rewritten. A hit is recorded, naming what leaked (DB_PASSWORD) so you know what to rotate. It records; it does not prevent — and we no longer pretend otherwise. By the time you press Enter the agent's TUI already holds the text; nothing can un-send it. (The old "redaction" toggle claimed it could. It couldn't, and it was broken: it withheld keystrokes and never wrote them back, so typing hello⏎ delivered only \r. It is deleted.) Prevention lives at the two boundaries where it is genuinely possible: the git shield and the memory scrub. The secret's value is never written to the log — names and rule ids only. A shapeless secret pasted with no surrounding words remains undetectable.
Secret gets committed, then pushed to a remote Commit/Push Secret Shield (v1.25) — the same 97-rule engine now also runs at the git boundary. Commit through Termpolis (the built-in Git panel, or Swarm Review's commit) and it scans the staged diff — exactly what git commit is about to capture. Push through Termpolis and it scans the full patch of every commit not yet on any remote — exactly what git push is about to send. A hit blocks the operation and names the rule that fired. The outbound scanner only ever saw text typed at an agent; it structurally never saw git, so a leaked key could still land in history and reach a remote. On by default. Out of the box it gates the git operations you run through Termpolis. To cover a git commit typed straight into a terminal — or run from an IDE, a script, anything — install the pre-commit / pre-push hooks: Settings → AI Security → Protect a repository. They shell out to a standalone scanner carrying its own copy of the rule table, so they keep working even with Termpolis closed (a hook that only guards you while the app is running would silently stop guarding you the moment you quit — worse than no hook, because you'd still believe you had one). An existing hook (husky, lint-staged) is chained, never overwritten, and its exit code still gates the commit. The hook fails open: if Node or the scanner is missing, git is never blocked. --no-verify bypasses any git hook — this is a strong net, not a cage. Regex-shaped secrets only, as above.
Secret gets remembered — persisted into the shared brain Memory-at-rest scrub (v1.25) — secrets are redacted before a memory is hashed, embedded, or written to disk, so a key sitting in a transcript or an indexed source file never lands in the brain and can never be recalled back into an agent's context later. On by default. Applies at write time — it redacts what's being stored now, not what a pre-v1.25 store already holds. Regex-shaped secrets only.
Whole .env or source file pasted Code-chunk + env-dump detectors (v1.11.52) flag prompts >2 KB that look like code (indentation + braces + keywords) or contain 5+ KEY=value lines. The renderer surfaces a notice + audit entry. Heuristic — false negatives possible on minified or unusual code shapes. The prompt is not blocked; you decide.
Free-tier Gemini sending prompts to Google for product improvement Gemini account-mode auto-detection reads GEMINI_API_KEY / GOOGLE_GENAI_USE_GCA / GOOGLE_APPLICATION_CREDENTIALS+GOOGLE_CLOUD_PROJECT to classify the active session. Strict Mode intercepts gemini launches that look free-tier and refuses to forward them. Blocked launches are audited. Detection is env-var based; if you ship credentials some other way the heuristic can't see, it can't classify them.
Provider quietly changes their ToS / data-controls page Weekly ToS drift watcher (v1.11.52) GitHub Action fetches the four provider pages we cite (Anthropic, OpenAI, Google, Alibaba), normalizes the HTML, hashes it, and opens a tracking issue when the hash changes — so the docs in this repo stay aligned with what the providers actually publish. Detects rendered-text changes, not legal intent. A human still reads the diff.
Agent silently talking to an unexpected endpoint Egress audit (v1.11.52) polls netstat (Windows) / ss (Linux) / lsof (macOS) once a minute for the AI agent's PID and records each unique remote host:port to the audit log + Security panel. As of v1.25 that record is a policy: Egress Guard judges every observed endpoint against a published allowlist of AI-provider domains and raises anything else as a violation in the audit trail. Suffix matching is dot-anchored (an exact host, or a true dot-delimited subdomain of one), so evil-anthropic.com and anthropic.com.evil.net do not pass as Anthropic. Loopback and LAN addresses are never violations — a local model server is not exfiltration. On by default. Polling, not packet capture — sub-minute bursts can be missed. No payload inspection. It flags; it never kills a connection. The poller only yields IP literals, so the allowlist is forward-resolved — when DNS is unavailable the guard stays silent rather than reporting every provider IP as exfiltration.
A third-party skill / plugin / MCP server you import Safe Import (v1.25) — a skill, plugin, slash-command, subagent, or MCP server is not data: it's code plus instruction text handed to an agent that already holds your credentials, your repo, and a live PTY. Termpolis statically scans it before it touches your machine41 rules across outbound network calls, shell / eval execution, credential + ~/.ssh access, obfuscated payloads, and prompt injection hidden in the artifact's own instructions (tool poisoning — no dangerous API call appears anywhere; the agent is the exploit), plus context-sensitive checks that judge a construct by what surrounds it: a base64 decode feeding an execution sink is red, a decode on its own is yellow. You get a red / yellow / green report with file:line and the offending line. Red can never be installed — the refusal is enforced in the main process, not the UI. Approvals are hash-pinned, so editing an approved artifact re-prompts (no trust-on-first-use-then-swap). Zip-slip and TOML injection are refused by the installer. A static review aid, not a sandbox — nothing is executed, in a jail or otherwise. It is line-based, and a determined attacker can obfuscate past any of it. Its job is to put the three lines that matter in front of you before you click Import — not to prove the artifact is safe.
Tampering surface beyond the terminal itself No browser extension, no IDE plug-in, no ad-hoc cloud sync. The MCP server is bound to 127.0.0.1 with a token that rotates on every restart. No Termpolis telemetry, no Termpolis cloud accounts. Termpolis is itself an Electron app — same caveats apply as any local desktop process running with your privileges.
Forensic record of what was typed at agents Local JSONL audit log: every AI terminal open/close, every secret observed leaving in a prompt (prompt_secret_sent — names and rule ids only, never values), every code-chunk / env-dump detection, every Strict-Mode block — plus, as of v1.25, every blocked commit/push, every import scan and refusal, and every egress violation. 10 MB rotated, append-only, on disk only, wipeable. On by default as of v1.25 (it previously defaulted to off, so for most installs it never existed). Local. We don't ship it anywhere. If your machine is compromised, so is the log.

v1.25 moved the perimeter to the boundaries that actually leak. The secret engine used to watch exactly one of them — the keystrokes you send to an agent. It now also gates what a commit made through Termpolis captures, what a push made through Termpolis sends, and what gets written into the shared brain; an imported skill or MCP server is scanned before it is wired into an agent; and agent egress is judged against an allowlist rather than merely logged. Those gates — and the audit log — default to on, and an absent setting key keeps the secure default, so an existing install is protected on upgrade without touching Settings. Each can be turned off individually in Settings → AI Security; Safe Import lives in Settings → General.

v1.25.6 — three controls that were quietly not firing. Every one was found by writing a test against code nobody had tested. If you are on 1.25.5 or earlier, this is what was silently not protecting you:

  • The GnuPG private-keyring rule could never fire. secring.gpg — your private keyring — had been grouped into the sensitive-file rule's own exclusion list beside the public keyrings, so the exclusion returned before the match could. A read of your private keyring was never flagged, and the failure mode was total silence, which reads exactly like "nothing happened". Only the pubring.* entries are excluded now.
  • A NaN limit defeated the audit-log clamp and returned the entire log. typeof NaN === 'number' is true, so a NaN limit took the clamp arm rather than the 200 default — and Math.min/Math.max propagate NaN rather than clamping it, so the read degraded to "return everything", which is the one thing the 2,000-entry cap exists to prevent. The guard is Number.isFinite now.
  • The Commit Shield reported repositories as PROTECTED after their hooks were removed. The protected-repo list was compared with a bare !==, and install stores either the renderer's cwd (forward slashes) or the native picker's OS-native path (backslashes) — so install-by-picker followed by uninstall-by-cwd never matched, and the repo stayed on the list with its hooks already gone. A security control that claims to be armed when it is not is worse than one that admits it is off. It is keyed on a canonical path now (Windows-only separator/case folding — a backslash is a legal filename character on POSIX, and folding it there would conflate two genuinely different repos).

Also fixed: the Strict-Mode Gemini refusal message never rendered on Windows. The banner was written to the PTY as a typed printf command, which only works on a shell that has printf — so on cmd.exe / PowerShell you got 'printf' is not recognized instead of the explanation, at the exact moment you most needed to know why the launch was refused. The block always worked; the message was what failed. It now goes straight to the renderer.

What this is and isn't: Termpolis is defense in depth for the hosted-model path — it raises the cost of accidental disclosure and gives you a record to audit. It is not a guarantee that source code cannot reach a provider — only not running the agent at all gives you that. The honest answer to "can a hosted model leak my code?" is "yes, if you send it; the question is whether the controls catch the obvious accidents and whether you trust the provider's terms for the rest." Termpolis is built for the engineers who've decided that trade-off is acceptable for the productivity hosted models give them.

See PRIVACY.md for the data-flow spec, TERMS.md for the Apache-2.0 / "AS IS" disclaimer.

🧠 Shared memory — the deep dive

The moat above in full — every capability of the brain that all four agents share:

  • One memory, four agents. Claude, Codex, Gemini, and Qwen all read and write the same store over the built-in MCP server (memory_search / memory_write / memory_list / memory_primer). A fact one agent figures out is instantly available to the others — no copy-paste, no re-discovery.
  • It survives quitting the app. Stored as plain JSONL (swarm-memory.jsonl) in Termpolis's per-user app-data folder — %APPDATA%\termpolis\ on Windows, ~/Library/Application Support/termpolis/ on macOS, ~/.config/termpolis/ on Linux — and reloaded with its embeddings at startup. Because it lives in your user profile (not the install folder), it survives app updates and even an uninstall/reinstall — close Termpolis, reopen it tomorrow, the context is still there.
  • It can follow you across machines (optional). Point the brain at a folder you already sync — Dropbox, OneDrive, iCloud Drive, Google Drive, Syncthing, or a git repo — and the same memory shows up on every computer. It rides the local synced folder their desktop client maintains (no provider API, no OAuth), so each machine writes its own shard file: there are never sync conflicts; the stores merge conflict-free (a content-hash-deduped grow-only set) and deletes propagate as tombstones. (Google Drive: use mirror mode so files stay on disk, not online-only.) No Termpolis server, no new account. Off by default; enable it in the Memory panel. Optionally encrypt it at rest with a passphrase (AES-256-GCM, key in the OS keychain) so the cloud provider only ever sees ciphertext — enter the same passphrase on each device to unlock.
  • It feeds itself. A background indexer ingests your past Claude / Codex / Gemini transcripts automatically (10 s after launch, then every 30 min). Idempotent (content-hash dedup), so it only ever embeds genuinely new content — no action required from you.
  • Fully offline, no server, no secrets. Embeddings run in-process via WASM with a bundled bge-small-en-v1.5 model — no Ollama, no native binaries, nothing leaves your machine. The indexer reuses the same sensitive-file denylist as the read watcher, so .env files, keys, and cloud credentials are never embedded.
  • Scales into six figures. Vectors are packed into a typed-array store (about half the RAM of boxed arrays), and past tens of thousands of entries an HNSW approximate-nearest-neighbour index engages automatically so search stays sub-linear (a few ms/query, measured). The graph lives off the JS heap and persists to disk. It builds once, lazily, in the background without blocking your searches — the first query after the store crosses the threshold returns instantly from the exact fallback while the index builds (frame-budgeted so the UI never stalls); every later search and launch uses the saved graph.
  • Auto-recovers from compaction. When Claude Code compacts its conversation to fit the context window, it summarizes detail away — but that detail still lives in the brain. Termpolis watches the terminal, waits for the compaction to settle (debounced through the whole thing), and re-adds a one-line memory pointer to the agent's input — ready to send, never auto-submitted — so the agent reloads what it lost behind the scenes over MCP (memory_primer) instead of a wall of pasted text. Cooldown-guarded to fire once per compaction; opt-out in Settings. Your durable memory is the large working set; the model's window only holds the active task.
  • See compaction coming. A live context-pressure pill in the status bar shows how full the focused agent's window is — healthy → filling up → nearly full → compaction imminent — from real token counts when the agent reports them (Claude's token_update stream) or a clearly-labeled heuristic otherwise. So you watch the pressure build and know recovery is handled, instead of being surprised by a compaction.
  • You can see it working — and trust what it returns (v1.16.7). Memory used to load invisibly, so a successful recall looked identical to no recall at all. Now every primed launch shows a banner — 🧠 Loaded N memories for "<project>" on success, or a clear ⚠️ Memory recall unavailable if the brain couldn't be reached — so you always know whether context loaded. Four reliability fixes back it up: a fast indexer tier makes your current conversation searchable within seconds instead of waiting for the next 30-minute pass; recall flags any code reference whose file has since been deleted as ⚠ STALE — verify before use instead of asserting it as fact; the memory hook resolves an absolute Node path so it still fires under thin-PATH login shells (NVM and friends); and an adaptive relevance floor keeps weak, off-topic hits out of the digest entirely — the agent gets the relevant slice, never padding.

How it works:

  1. Capture — your on-disk AI transcripts are parsed (tool-call / reasoning / system-prompt noise stripped) and split into chunks.
  2. Embed — each chunk becomes a 384-dim vector locally, in-process, via onnxruntime-web (WASM).
  3. Store — chunks + vectors persist in a durable on-disk log, deduplicated by content hash so re-indexing is cheap; vectors are packed into a typed-array store and indexed with HNSW once the brain grows large.
  4. Recall — any agent calls memory_search over MCP and gets the most relevant past context back, blending semantic vector search with keyword matching.

The result: stop re-explaining context every session, and stop paying to reload it.

Controls — open the Memory panel (Ctrl+Shift+M, or the Command Palette → "Memory") to see what's remembered (chunk count), search it, feed it on demand ("Index past conversations" / "Index this repo's code"), inject the most relevant context into the active agent with one click, and turn on cross-machine sync (point it at a synced folder). Launched agents are also auto-primed with the project's relevant context (toggle in Settings): a one-line note in the agent's input points it at the memory_primer MCP tool, so the digest loads behind the scenes — no giant dump on the terminal — and the agent holds it as background instead of acting on it or resuming old work uninvited. Context from the current directory's project comes first (its past conversations, then its code/notes), and anything recalled from other projects is clearly labeled as possibly not applying.


🕸 The Weave — one fabric across memory, code, and every repo (v1.23)

v1.23 "The Weave" turns the shared brain and the code graph into a single, self-weaving fabric. Recall no longer stops at text — it points at the code a lesson is about — and the non-obvious connections across your whole workspace are drawn ahead of time, so agents reason faster.

  • Memory ↔ code bridge. Stored lessons and decisions now carry structured code anchors (file + symbol), so recall can cross straight from "this is how we fixed the auth bug" to the exact function it lives in — and, in reverse, from a function to everything the brain knows about it. The two stores used to be islands; now they're joined by a shared key.
  • Predict where to fix it — code_locate. Give it an error or a problem description and it returns a ranked list of {file, symbol, why: [past lessons]} — the code sites most likely responsible, each with the fixes and decisions that point there. It's exposed as an MCP tool, so any agent can reach for it first when debugging instead of grepping blindly. (The bridge fills in over time: why gets richer as new lessons are anchored and the background weaver backfills older ones.)
  • The Weave — an always-on background connection-miner (flagship). While you're idle, a weaver continuously draws connections across the entire unified brain: cross-repo code-structure analogies (a pattern in one repo that echoes one in another), cross-repo answer/decision analogies, and the memory↔code bridge edges above — materialized ahead of time with provenance and a weight floor so the graph stays high-signal. The connections are already there when an agent needs them.
  • Per-repo, durable code graph. The code graph is now keyed per repository — a second repo no longer clobbers the first, and each repo's graph is a durable on-disk store, so a transient non-git directory (or git off the PATH) won't wipe one you've already built.
  • Automatic bug → fix edges. When a task with a problem finishes, Mneme now mints the causal solves edge automatically, so "this error → that fix" is traversable later without anyone hand-linking it.
  • Rock-solid, never-delete memory. Idle consolidation moves aged memories to a cold-archive tier instead of deleting them — nothing curated is ever lost — and deep recall can still reach archived entries and history beyond the hot search window. Cross-repo transfer is relevance-scoped, so one unified brain gives cross-project reuse without the noise.
  • Sharper learning. An opt-in LLM distiller (TERMPOLIS_MNEME_DISTILLER=1) writes richer, more precise lessons; memory_related is now undirected, so a connection surfaces from either end.
  • The explains edge — the code ↔ purpose bridge (v1.25). A semantic memory now links directly to the code chunk it explains, so the prose that says why a thing works the way it does hangs off the code itself. The edge is gated on both embedding similarity and a shared file/symbol anchor — a merely chatty neighbour can never claim to explain code it has no anchor into. In the same pass the weaver was fixed to actually mint what it mined: intra-repo analogies are now allowed (it was cross-repo only, so the most useful connections — the ones inside the repo you're in — were being discarded), and the similarity floor drops 0.82 → 0.72.

🆚 How Termpolis improves on other AI harnesses

Termpolis doesn't replace Claude Code, Codex, Gemini CLI, or Qwen Code — it runs them, unchanged, and adds the layer they're all missing. A bare AI CLI (or an IDE assistant like Cursor or Copilot) is a single vendor's model talking to a single session: no memory of yesterday, no awareness of the other tools you use, and no guardrail on what leaves your machine. Termpolis turns that into a coordinated, persistent, auditable workspace.

What you actually get A bare AI CLI / IDE assistant The same agent inside Termpolis
Memory across sessions A per-session context window that resets cold every launch — you re-explain the task and re-pay the tokens to reload it One local brain all four agents share, surviving restarts and (optionally) syncing across machines; auto-fed from past transcripts; observable + staleness-guarded (v1.16.7)
More than one model Locked to one vendor's family Claude + Codex + Gemini + Qwen run as a team under a local conductor that routes each subtask to the best-suited model
Secrets / code leaving the machine Whatever you type is sent as-is, and you never find out Every prompt is scanned against 97 secret patterns. Your text is forwarded untouched, and a hit is logged by name (DB_PASSWORD) so you know what to rotate — the value is never stored. And since v1.25 the same engine actually blocks a git commit or git push that would carry a secret into history or to a remote
Importing a third-party skill / plugin / MCP server Wired straight into the agent's config — a zip nobody diffs, whose instruction text the agent reads as if you'd typed it Safe Import statically scans it first (41 rules, including prompt injection hidden in the artifact's own prose). Red is never installable, and approvals are hash-pinned so an edited artifact re-prompts
Knowing what the agent contacted Opaque — you can't tell who it talked to Per-agent egress audit (netstat / ss / lsof) records every remote host the agent reached — and Egress Guard judges each one against a provider allowlist, raising anything else as a violation
Telemetry on you Often product analytics or cloud-stored chat history None by default — memory, history, and the audit log stay in local JSONL on your disk
Lock-in Vendor account, cloud backend, or a specific IDE Apache-2.0, local-first, no Termpolis account, no Termpolis server
Coordinating parallel agents You juggle terminals by hand Real-time observability — activity feed, redundancy detector, efficiency panel, and a swarm dashboard

The short version: other harnesses optimize a single agent's loop. Termpolis optimizes your whole agent fleet — giving four competing models one shared, durable, trustworthy memory (hardened in v1.16.7 so a working recall is visible, fresh, and never cites a file that no longer exists), a security perimeter around the hosted-model path, and a single place to watch and review everything they do. See the full, sourced feature-by-feature comparison vs Warp, Wave, JetBrains Air, and Tabby.


🔀 Second Opinion — a different agent double-checks the last answer

Every model has blind spots. Second Opinion hands the most recent answer in any AI terminal to a different agent for a fast, read-only critique — the feedback is pasted back into the same terminal, ready for you to send to your primary agent or just read and discard.

  • Pick any installed agent. A Second Opinion dropdown on each AI terminal lists exactly the agents you have installed — OpenAI Codex, Gemini, Qwen — with Claude and its models (Fable · Opus · Sonnet · Haiku) nested underneath. So while you're driving Opus, you can have Fable — or Codex, or Gemini — sanity-check the last solution.
  • It reviews the real, recent work. Termpolis captures the terminal's most recent output, asks the chosen agent to review the latest solution/answer/approach, and injects its concise feedback back into your terminal as an unsent block — you decide whether to act on it.
  • Read-only by design. A review needs no file access, so it runs the agent in one-shot headless mode — nothing it says touches your repo. The captured text is passed out-of-band (never on a command line), so a prompt scraped from your terminal can't inject a command.
  • Only what's installed shows up, and it appears only on AI terminals. Gemini runs through the Antigravity CLI (agy), its current headless entry point.

Proven end-to-end. A CI test drives a real review from Claude, Codex, and Gemini (via agy) against a deliberately-bad solution ("sort 1,000,000 items with bubble sort") and confirms each returns substantive feedback.


⚡ Token Headroom — compress what Claude Code sends, cut your burn rate (v1.29)

Long AI coding sessions chew through rate limits and hit compaction fast — and the biggest culprit isn't your prompts, it's the file reads, command output, and pasted screenshots the agent ships back to the model on every turn. Token Headroom compresses that traffic before it reaches Anthropic, so you get more work done per session before you hit a wall.

  • Always on for Claude Code. Every Claude session launches through a local, off-thread compression proxy (its own process — never the UI/PTY thread). No toggle, no setup. If the proxy is ever unhealthy the launch silently goes direct, and a live session self-heals when the proxy recovers — so a proxy hiccup costs you compression, not your agent.
  • It compresses what actually costs you. Verbose Bash/command output, large file Reads, and pasted images (downscaled below the model's cap) are shrunk deterministically. Nothing is lost — the agent calls the retrieve_full tool to pull any compressed result back in full when it needs the detail.
  • Prompt-cache safe — proven. Naive compression busts Anthropic's prompt cache and costs you more. Headroom compresses deterministically, so re-sent history stays byte-identical and the cache keeps hitting. Measured on a real multi-turn session: ~50% fewer tokens ingested per turn with cache hits fully preserved.
  • Your memory/brain is never touched. Compression lives only on the outbound wire to Anthropic; the shared memory store, recall, and learning are untouched.
  • See the receipt. Settings → Token Savings shows the live % of tokens saved (session + all-time), by type, plus prompt-cache health — computed from Anthropic's real usage numbers, on your machine.

Built in-house, tested hard. Deterministic compressors, a source-level cache-safety guard, fail-open at every layer, and an end-to-end proof measuring real token reduction with the cache intact — all under Termpolis's 7,000+ test suite.


📊 Memory & Learning dashboard — proof it's working, computed locally

A Memory & Learning tab in Settings turns the brain from a black box into an inspectable instrument — every number computed on your machine, offline, from the append-only store. No word-taking; nothing on the screen leaves your machine.

  • Vector memory — int8 quantization, and a straight answer about whether you want it. Your embeddings live in the main process — the same thread that pumps the PTY — so storing them as int8 instead of exact floats is 4× less vector RAM. But a bare switch would be a trap — nobody can answer "should I enable int8 quantization?" in the abstract — so this is a decision aid, and the answer it gives almost everyone is don't: at a typical corpus (14k vectors ≈ 21 MB) it says "not needed — turning int8 on would free about 16 MB, which is not enough to change anything." A control that only ever markets itself is an upsell, not a tool. Off by default. Settings → Memory & Learning.
  • What's stored — memories by cognitive type (episodic · semantic · procedural · entity · summary) and by which agent authored them.
  • Live knowledge graph — a force-directed view of the real typed edges recall walks (bug → fix → what superseded it), colored by type.
  • Code connections (v1.25) — the structural code graph (symbols, and the caller/callee edges between them) now has a tile of its own. Indexing a repo was already minting thousands of these edges into a store the dashboard simply never read — so "connections" looked empty while the graph underneath was full.
  • Competence, calibrated from real work (v1.25) — per-domain self-competence now learns from what actually happened: a landed commit and a passing or failing test run both feed the calibration. It previously only fired on a completed swarm task, so for most people every domain sat at zero attempts and the panel stayed blank forever. A failing suite is what finally calibrates confidence down.
  • Learning over time — cumulative growth of the store and the distilled lessons within it.
  • Reliability SLIs — recall-fired rate, embedder availability, write durability, and typical (median) recall latency. (v1.25.6: a UI search that had fallen back to keyword — because the embedder was down — was still being booked as a vector recall, so the dashboard over-counted them. It reports the path that actually ran now. A proof dashboard that flatters itself is worse than no dashboard.)
  • Model portability & cross-agent learning — which agents authored what, and where a lesson one agent learned was later reused by another.
  • Receipts — recalls served, solutions reused, and estimated tokens saved.

These numbers are read when you open the tab and when you press Refresh — never on a timer (v1.25.16). Computing them means scanning the whole store, and that scan runs in the main process, which is the same thread that echoes your keystrokes into the PTY. On a 5-second poll it stalled typing every 5 seconds and generated enough garbage to drive the very GC pauses the dashboard used to display. A dashboard paid for out of your typing latency is not worth having. The freeze history that used to sit above this section is gone for a worse version of the same reason — see Diagnostics that cost more than they're worth, below.

On int8, two guarantees worth stating plainly. Recall parity against the exact-float baseline is benchmarked and CI-gated — the benchmark scores the quantized store against the same committed baseline as the float one on the real bge model, and recall@10 is identical; a change that degraded it would fail the build. And it is losslessly reversible: the JSONL on disk always keeps exact floats, so int8 is purely an in-RAM representation, never a data migration. Turning it off restores full precision — nothing is ever destroyed.

The screenshot shows the dashboard's layout with representative sample data; your instance fills in with your own local numbers as you work.

Diagnostics that cost more than they're worth (removed in v1.25.16)

v1.25.15 shipped a V8 sampling profiler so that a freeze in unlabelled code could still be named. The reasoning was sound and the measurement was not: Profiler.stop was clocked at 4–15 ms in a small test script, so it was called straight from the stall watchdog. In a real main process — 1.1 GB heap, 1.75 GB RSS, an enormous loaded-code fo