Series: Cursor Agent Harness (Part 2 of 3)
Part 1: Lightweight harness without a microservice — you keep model and mode control
Memory foundation: Four tiers of external memory · External Memory series hub · Governance layer
The problem: memory everywhere means tokens everywhere
External memory works when agents read the same files in the same order every session. It fails when every tier loads on every turn: vault Session Summaries, brain-pack gotchas, MCP Obsidian reads, and subagents each re-embedding 14k tokens for a question that needed one paragraph.
The harness from Part 1 is not only when to spawn subagents. It is when to load which memory tier — while you still own the files, the model choice, and the ship decision.
Why four tiers (not three)
The External Memory Series describes the stack as three layers for clarity. In practice there are four tiers — and the fourth is the one most diagrams label "feedback loop."
| Tier | Name | What it holds | Harness load gate |
|---|---|---|---|
| Layer 1 | Short-term | Current chat, open files, git diff | Always in context — don't duplicate in brain-pack |
| Layer 2 | Operational | Session Summaries, Bridge, NEXT_SESSION.md, memories/repo/*, bootstrap snapshot | Once at session start for code work; skip for Mode A Q&A |
| Layer 3 | Evergreen | Features/*, Architecture/*, shared conventions | On demand for the task area — not every turn |
| Layer 4 | Feedback hardened | Rules, custom agents, hooks, footer contract, eval:gate | Write at session end; read via alwaysApply rules — not a 14k paste |
Layer 4 is not another folder to grep. It is the Session Continuity System made concrete: session context at the top, v3.1 footer at the bottom, self-improvements with an exact file path, and hooks that regenerate brain-pack.md without you re-explaining gotchas every chat.
brain-pack is a warm embed — mostly Layer 2 facts plus pointers into Layer 3. It is not a substitute for Layer 4. The harness prevents treating brain-pack as "load everything always."
How harness gates map to tiers
| Session type | L2 operational | L3 evergreen | L4 feedback | Subagents |
|---|---|---|---|---|
| Mode A Q&A | Skip brain-pack + vault sweep | Skip unless question needs one Feature | Rules only (alwaysApply) | No |
| Code work | brain-pack once; Bridge/Summaries on demand | Read relevant Features/* | Footer Mode C–D at ship | Per policy table |
| Plan-only | Lighter bootstrap (Mode B footer) | IDN before first edit if 3+ files | No deploy fields | No batch for single scope |
You stay in control: the gates are defaults the agent follows. Override with plain language ("skip vault," "read Features/Referrals only," "inline this, no batch").
Rule of thumb: native Read/Grep on vault paths you already have locally. Do not stack MCP + native Read on the same file in one turn.
Git vs Obsidian vs feedback (Layer 4)
| Content | Tier | Canonical home |
|---|---|---|
| HARNESS-POLICY, eval JSON, CSV schema | L4 + git | docs/ in repo |
| Session narrative, open loops | L2 | Obsidian Operations/* + memories/repo/ mirror |
| Features, conventions | L3 | Project vault + shared conventions |
| Rules, agents, hooks, footer contract | L4 | .cursor/rules/, .github/agents/, AGENTS.md |
Harness policy in git versions with the app. Session handoff in Obsidian stays human-readable. Feedback loop = lessons that graduate into rules (footer Self-improvements must cite path:Lnn or the write did not happen).
Session summary line (Layer 2 → Layer 4 bridge)
Append to Operations/Session Summaries.md:
- YYYY-MM-DD HH:MM (Project — **title**) — Harness: direct|batch|test|release; tests_before_ship: yes|no; failure: none|wrong-fix|redeploy; — <outcome>
Mirror one row in docs/harness-session-log.csv for weekly math (Part 3). The Summary line is Layer 2 narrative; the CSV is Layer 4 instrumentation you review to decide whether to build more orchestration.
Enable this on another repo
- Copy
context-budget.mdcandHARNESS-POLICY.mdfrom your reference repo. - Point
sessionStartat yoursession-prepscript; generate brain-pack frommemories/repo/. - One Obsidian vault root per project in MCP or native Read.
- Teach agents: Mode A skips bootstrap; ship sessions write one Summary line.
Reader action
Audit your last five agent sessions. Count how many loaded brain-pack or vault files for questions that needed no code. Map your stack to four tiers — if Layer 4 is only "hope the model remembers," add footer + one rule file before adding another memory product. Part 3 shows how to log and review that discipline weekly.
Get practical posts on enterprise AI and transformation. Only useful updates, sent as a weekly digest.
One practical digest each week. Unsubscribe anytime.







