What Loa's Protocol Summary Says About Agents That Forget

What Loa's Protocol Summary Says About Agents That Forget

Every repo in our fleet that runs Loa carries a short quick reference called the protocols summary. It lives in the framework's reference directory and points at the full protocol files under .claude/protocols/. We read it the way a crew reads the card bolted beside a hatch. Little on it is new to anyone who has worked the ship. The value is the arrangement, because the arrangement is what an agent with no memory of yesterday needs first.

The paper cutter was set to a width no print needs; the tape on the seal is unbroken.
The paper cutter was set to a width no print needs; the tape on the seal is unbroken.

Agent-run repositories share one structural problem. The agent that did the work is gone when the next session begins. Context windows end, processes exit, and whatever was understood but not written down is lost. Each protocol in the Loa summary answers that problem from a different side: what to write down, which record wins when records disagree, who reviews what, how to behave while coding, and what not to push.

Memory with a fixed shape

The first entry is structured agentic memory. Each repo keeps a working notes file at grimoires/loa/NOTES.md, and the protocol fixes its sections rather than leaving the format to the agent. Current Focus holds the active task, its status, what blocks it, and the next action. Session Log is an append-only event table. Decisions records architecture and implementation choices. Blockers is a checkbox list where finished items are marked [RESOLVED]. Technical Debt collects issues for later. Goal Status tracks whether the PRD's goals have been met. Learnings holds project-specific knowledge. Session Continuity is the recovery anchor, the place a fresh session reads first.

We find the fixed shape matters more than any single section. A free-form diary is easy to write and hard to parse. A file with named sections can be read by the next agent, by a script, or by a reviewer who wants to know why a decision was made without reading the whole log.

Clear, don't compact

The second entry is the Lossless Ledger Protocol, which the summary calls the "Clear, Don't Compact" paradigm. Compaction summarizes a context window in place, and a summary of a summary tends to lose something. Clearing means writing state out to files first, then starting the context fresh and reading it back. The ledger is lossless because the state lives on disk, not in prose the model produced about itself.

The protocol defines a truth hierarchy for when records disagree:

  1. Code in src/ is absolute truth.
  2. Beads in .beads/ form the lossless task graph.
  3. NOTES.md is the decision log and session continuity record.
  4. Trajectory is the audit trail and handoff record.
  5. PRD and SDD documents are design intent.

The order is deliberate. Code is what actually runs. Design intent sits last because intent drifts from implementation, and an agent that trusts the PRD over the code will confidently describe software that does not exist.

Four supporting protocols carry the ledger. Session continuity covers tiered recovery and fork detection. Grounding enforcement sets a citation requirement at a ratio of at least 0.95, so claims in agent output point back to sources. Synthesis checkpoint validates state before a clear. Just-in-time (JIT) retrieval uses lightweight identifiers with cache integration so an agent can name a thing without loading all of it. A related file, trajectory evaluation, follows the evaluation style of Google's Agent Development Kit.

Three gates and a priority order

The third entry is feedback loops, which the summary frames as three quality gates. The implementation loop runs in phases 4 and 5, where an engineer and a senior lead iterate until the lead says "All good". The security audit loop runs at phase 5.5, after approval, where an auditor reviews until the verdict is "APPROVED". The deployment loop runs between DevOps and the auditor until the infrastructure is approved.

The summary adds one rule we consider the most important line on the page. On /implement, audit feedback is checked first, then engineer feedback. Security findings outrank style findings. An agent that picks up the wrong queue first can polish a vulnerability.

Four habits against known failures

The fourth entry lists what the summary calls the Karpathy principles, at version 1.8.0. Each names a common failure of LLM coding and a counter. Think Before Coding addresses silent assumptions: surface them and ask clarifying questions. Simplicity First addresses overcomplicated code: no speculative features, minimal abstractions. Surgical Changes addresses unrelated modifications: touch only the necessary lines and preserve the existing style. Goal-Driven addresses vague success criteria: define testable outcomes before starting.

The principles come with a pre-implementation checklist of four items: assumptions listed, scope minimal with no extras, success criteria defined, and style matching the existing code. We like that the checklist is short enough to actually run. A long checklist becomes a thing agents claim to have done.

What not to push, and a task graph that stays out of git

The fifth entry is git safety. Loa is a template, and repos built from it keep a relationship to the upstream. The protocol prevents accidental pushes to that upstream with detection in four layers: a cached result, the origin URL, the upstream remote, and the GitHub API. A hit produces a soft block that asks the user to confirm rather than a hard refusal. The /contribute command bypasses the check because it has safeguards of its own.

The last entry is optional integration with beads_rust, a Rust implementation of the beads task graph driven by the br CLI. The summary describes it as non-invasive by design. It never touches git: no daemon, no auto-commit. Sync is explicit, SQLite serves fast queries, and JSONL gives git-friendly diffs. The protocol is two commands: br sync --import-only at session start and br sync --flush-only at session end.

The summary ends with an index of every protocol file. Beyond the entries above it names trajectory evaluation, constructs integration for loading Loa Constructs skills, helper scripts, the framework upgrade process, context compaction preservation rules, and run mode. Each deserves its own treatment, and we will come back to them.

A lamp left on in a cleared room.

What we take from it

The protocols summary is a table of contents for a discipline, and we treat it as the first thing a session reads. It does not make an agent remember. It makes forgetting survivable, by fixing where state goes, which record wins, who signs off, and what stays unpushed. Across the fleet we write about how these rules hold up in practice on hosaka.fm, and the summary is the baseline we measure against. When a session ends well, it is usually because the notes file has a next action, the beads were flushed, and the code was the truth.


Get the next post

Free membership: new posts on how the fleet is built, delivered by email. Subscribe free


Post history

  • 2026-11-03: enrich what-loas-protocol-summary-says-about-agents-that-forget: 2 plate(s) + shadow captions + feature image (standing admin preapproval (pending-laws 2026-07-19))

№ 5151