Case study / 2026-05-06
Jarvis
A memory layer for AI agents that forget everything.
AI coding agents are stateless by default,and stateless agents make the same mistake on Tuesdaythat they made on Monday.
03 / CONSTRAINTS
Operating envelope
- It had to work across agents that don’t share a memory model natively — a cloud coding agent, a second cloud agent used for parallel work, and a fleet of local models, all with different context windows and none of them aware the others exist.
- It had to survive an agent’s context getting compacted or a session dying mid-task, because forgetting mid-task is functionally the same failure as never learning at all.
- It couldn’t require forking or patching any agent’s core — a layer that wraps, not one that invades.
- And it had to stay cheap: routing every trivial lookup to the most expensive model available would be financially indefensible at real usage volume.
04 / THE SYSTEM
How it holds together
Read the system narrative
A tiered memory architecture: a small hot-cache of identity and status loaded into every session regardless of task, a mid-tier index that tells an agent where to look instead of loading everything, and a deep archive that’s searchable on demand but never preloaded. Sitting on top of that: a model-tiering ladder (cheap fast model as the floor, escalate reasoning effort before escalating to a pricier tier, reserve the most expensive tier for genuine cross-domain judgment calls) and a dispatch layer that lets any of several coding agents — cloud or local — pick up a task behind one thin, swappable contract, so the harness controls routing and failover rather than a human manually choosing a tool each time. A session-hygiene protocol (structured hand-off notes, a running decision log, self-updating status files) is what actually makes the memory durable across the gaps between sessions, which turned out to matter more than any embedding model.
05 / WHAT BROKE
INC-20260506Incident replay
- Symptom
- a monitoring endpoint reported “connected: true” using cached credentials.
- Root cause
- the actual execution path underneath it was silently broken — a fresh process was missing a credential file the cached check never touched.
- Fix
- a “dual-probe” doctor — never trust one signal, always check the cheap status and a tiny live operation, and treat any disagreement between the two as the actual incident, not a fluke.
SYMPTOM: a monitoring endpoint reported “connected: true” using cached credentials. ROOT CAUSE: the actual execution path underneath it was silently broken — a fresh process was missing a credential file the cached check never touched. FIX: a “dual-probe” doctor — never trust one signal, always check the cheap status and a tiny live operation, and treat any disagreement between the two as the actual incident, not a fluke. One clean green light was lying, and I trusted it for longer than I’d like to admit before a real task failed and the monitor still said everything was fine.
06 / RETROSPECTIVE
What I’d do differently
I’d have built the dual-probe pattern on day one instead of retrofitting it after getting burned once already. I’d also have made “which model tier is this running on” an explicit, required field from the start — letting a background task silently inherit its parent’s (expensive) tier is an invisible cost multiplier that only shows up weeks later in a bill.
07 / SPEC PLATE
Build record
- Status
- live LIVE
- Stack
- Claude Code + Codex CLI + local model mesh, Python glue, tiered memory store.
- Scars
- the health check that lied.
- Last incident
- 2026-05-06