# SEAHORSE: What Actually Makes an Agent Code Well: Concurrency, a Bible, Four Premises, and the Harness: summary pyramid of version 1.0

> How to read this file. Each heading holds a summary written for this site (marked **Summary**, not the author's words), then its parts. Text under **Original** is the paper's own text, word for word, in reading order. The full paper as one text: https://sprintpaper.com/papers/agent-coding/v/1.0.md. The same tree as JSON: https://sprintpaper.com/api/v1/papers/agent-coding/pyramid.json.

## Summary of the paper

An AI agent codes well, this paper argues, when it can work beside other agents without corrupting their work, find out what is true before it acts, hold a few sound beliefs about evidence, and run on a harness (the software layer the agent runs on) that supports all three. The evidence is one system's dated record: a fork of an open-source agent harness, run by one person with several agents on the same code at once. ORCA, its orchestrator, lets agents draft in parallel and locks a file only while a patch is applied. Its design documents carry 339 executable checks, yet on 2026-08-04 every check passed while four main features were dead, because such a check confirms that parts exist and agree, not that they run. Four premises about belief each come from an incident that cost weeks to months. The thesis: agent coding is limited by how visible the agent's own work is.

What you get from this paper

- How several agents can edit one codebase safely: draft in parallel, lock only while applying, commit each unit alone.
- Why passing documentation checks can sit beside dead features, and how to measure what actually runs.
- How a failing check with no stated reason sent an agent toward about 65 edits that changed nothing, and how to scope a check.
- Four premises for acting on incomplete evidence, each with the incident behind it.
- Which harness features mattered, what harnesses still lack, and why to trigger on the event that always fires.

**Provenance note.** This paper is written from one system's operating record, not from a survey.
Every incident it cites is first-party, dated, and reproducible from the reference implementation's
git history, its bug log, and its ledgers. Where the wider literature has measured something
relevant it is cited; where it has not, the paper says so rather than borrowing a number. The
reference implementation is a fork of an open-source agent harness, operated continuously by a
single architect with several agents working the same tree at once.

**A word on the codename.** SEAHORSE is the first J-series name taken from the sea rather than from
neuroanatomy, joining the tooling it describes — ORCA, the parallel coding orchestrator, and
MERMAID, the diagram language the design corpus renders with. The collision is worth naming: the
hippocampus is named after the seahorse (Greek *hippokampos*), and J2 already holds HIPPOCAMPUS. So
this paper and the memory paper are, etymologically, the same animal. That is an accident, but not
an unpleasant one: this paper is about what a coding agent must remember in order to work.

## Abstract

**Summary.** The paper argues that an agent codes well when it can work beside other agents on the same code without corrupting it, find out what is already true before acting, hold a few beliefs that survive a large codebase, and run on a harness that supports all three. It takes them in turn: ORCA, an orchestrator that locks a file only while a patch is applied, never a whole task; a design corpus with executable checks, and what it missed; four premises about belief, each tied to an incident that cost months; and what a harness must provide. The main negative result: a documentation check confirms shape (that parts exist and agree), not liveness (that they run). On 2026-08-04 all 339 checks passed while four main features were dead, one for eight weeks.

**Original.**

An agent that writes code well is not primarily an agent that writes good code. It is an agent that
can (a) work alongside other agents on one tree without corrupting it, (b) find out what is already
true of the system before acting, (c) hold a small number of beliefs that survive contact with a
large codebase, and (d) run on a harness that gives it the primitives for the first three.

This paper takes those four in order. §1 describes ORCA, a lease-based orchestrator for concurrent
multi-agent editing, and argues that the correct unit of mutual exclusion is the *file during
application*, not the task. §2 describes a structured design corpus — a "bible" of single-owner
optics with executable verification blocks — and gives an honest accounting of what it did and did
not prevent, including four features that were simultaneously dead while 339 documentation
invariants passed. §3 states four premises about belief that separate an agent which makes progress
from one which stalls, each grounded in a specific incident where the belief was violated and the
cost was measured in months. §4 surveys harness capabilities.

The paper's central negative result is in §2, and it is the reason §3 exists: **a documentation gate
asserts shape, not liveness.** Every invariant in the corpus can pass while the system it describes
does nothing at all. On 2026-08-04 that was not hypothetical — four headline features were dead
simultaneously, one of them for eight weeks, with a fully green gate.

## 1. ORCA — concurrent agents on one tree

**Summary.** When several agents edit one codebase, what breaks is two of them writing the same file at overlapping times; reading and drafting, the costly part, are safe in parallel. ORCA therefore splits each unit of work into three phases: draft in parallel with no lock, apply under a short lease on the files touched (redrafting if another unit changed them first), and commit each unit alone with only its own files. The lease guarantees only that a patch is applied to the code it was drafted from. It does not make parallel edits correct: units that share an interface need a contract owner that applies first. Both disciplines are known; the paper's claim is giving each to a different phase.

### 1.1 The problem is narrower than it looks

**Summary.** What breaks when several agents code together is narrow: two agents writing the same file at overlapping times. Reading, reasoning, drafting and testing are safe to run in parallel, and they are the expensive part (minutes and many thousands of tokens), while writing the patch takes milliseconds. Locking whole tasks therefore makes agents queue for the costly work in order to protect the cheap step.

**Original.**

The obvious framing of multi-agent coding is "how do several agents divide a task?" That framing
produces schedulers, planners and role hierarchies. It is the wrong first question, because the
thing that actually breaks is much more specific: **two agents writing the same file at
overlapping times.** Everything else — reading, reasoning, drafting, testing — is safely parallel.

This matters because the expensive part of an agent's work is the part that is safe. Reading a
subsystem and deciding what to change can take minutes and many thousands of tokens. Writing the
resulting patch takes milliseconds. A design that serialises agents at the *task* level pays the
expensive part serially to protect the cheap part.

### 1.2 The three phases, and why the lease is where it is

**Summary.** ORCA, the paper's orchestrator, splits each unit of work into three phases. In phase A every agent reads the code and drafts an exact patch, all in parallel and holding nothing; nearly all the time and tokens go here. In phase B an agent takes a short lease on the files its patch touches, applies it and lets go: units with no shared file run at once, and a patch made out of date by another unit is redrafted, never forced in. In phase C each unit becomes its own commit with only its own files, never `git add -A`, because a parallel session kept one to five modified files in the tree the whole time.

**Original.**

ORCA splits each unit of work into three phases with different concurrency rules.

**Phase A — draft, fully parallel, no lease.** Every agent reads the tree and produces an exact
patch for its own edit-unit. No agent holds anything. This is where nearly all the wall-clock and
nearly all the tokens go, and it is embarrassingly parallel because reading is not a mutation.

**Phase B — apply, serialised per file.** An agent takes a short-lived lease on the files its patch
touches, applies, and releases. Units with disjoint file sets run concurrently; units sharing a file
serialise. A patch that has gone stale because another unit landed first is **re-derived**, not
force-applied — the agent goes back and redrafts against the new state.

**Phase C — commit, one commit per unit, serialised.** Each applied unit becomes its own commit,
staging *only that unit's files*. Never `git add -A`.

That last rule looks like fussiness and is not. On this system a second agent's uncommitted work is
present in the tree at essentially all times — over the session that produced this paper, a parallel
session held between one and five modified files continuously. `git add -A` from either agent would
have swept the other's half-finished work into a commit that claims to be about something else. The
rule is not hygiene; it is the difference between "concurrent agents" and "one agent and a hazard".

### 1.3 What the lease is actually protecting

**Summary.** The lease does not keep two agents' plans consistent. It only makes sure a patch is applied to the same state of the code it was drafted from. When two agents want the same file, the loser waits and redrafts, a normal event with a set recovery; systems that treat it as an error tend to retry the same old patch, and that is how a merge conflict ends up as a corrupted file.

**Original.**

It is worth being precise, because it determines the design. The lease does not protect *coherence
of intent* — two agents can hold entirely compatible plans and still corrupt a file. It protects a
much smaller invariant: **that a patch is applied against the tree state it was computed from.**

This gives the correct failure behaviour for free. If a lease is contended, the loser does not fail,
it *waits and re-derives*. Staleness is a normal, expected event with a defined recovery, rather
than an error. Systems that treat concurrent edit as an error tend to acquire a retry loop that
re-applies the same stale patch, which is how you get a merge conflict rendered as a corrupted file.

### 1.4 What this does not solve, stated plainly

**Summary.** ORCA makes parallel edits safe, not correct. If one unit changes a function's signature and another adds a caller that uses the old one, both apply cleanly and the build still breaks. The system's answer is a contract owner: one unit owns the shared interface, and the units that depend on it draft only after it has applied. Splitting the work into independent units is the caller's job; ORCA does not check it.

**Original.**

ORCA makes concurrent edits safe. It does not make them *correct*. Two units can each be individually
right and jointly wrong — the canonical case being a shared contract where unit A changes a
function's signature and unit B adds a caller using the old one. Both apply cleanly; neither is
stale; the build breaks.

The mitigation the reference implementation uses is a contract owner: when units are interdependent,
one unit owns the shared interface and the others declare a dependency on it, so the dependent units
draft *after* the owner has applied. This is a real constraint on decomposition and it means the
orchestrator cannot be handed an arbitrary task list. Independence is a property the caller must
establish; ORCA enforces safety, not independence.

### 1.5 Relation to the literature

**Summary.** The lease is pessimistic locking per file, and "draft first, check on apply" is optimistic concurrency control that redrafts where it would abort. What the paper finds less common in agent frameworks is the phase split: the optimistic discipline for the costly phase and locking for the cheap one, inside one unit of work.

**Original.**

The lease pattern is not novel in itself — it is pessimistic locking at file granularity, and the
"draft optimistically, validate on apply" shape is optimistic concurrency control with re-derivation
instead of abort. What appears less common in agent frameworks is the *phase split*: applying the
two disciplines to different phases of the same unit of work, so the expensive phase gets optimistic
concurrency and the cheap phase gets pessimistic locking.

## 2. The bible — a design corpus with executable invariants

**Summary.** The system's design corpus is about thirty documents, each the only home of one kind of fact, with 339 executable checks run by one command. When an agent misread one of its rules, naming three jobs (EXPLAIN, ENFORCE, CHECK) and a home for each removed the ambiguity. The corpus makes orientation fast, but on 2026-08-04 all 339 checks passed while four main features were dead, because documentation checks confirm shape (that parts exist and agree), not liveness (that they run); a capability registry built afterwards found that only 24% of capabilities gave any signal. The opposite failure came from upstream: a check with no stated reason failed in the fork, and the agent proposed about 65 edits that changed nothing. A check should carry its own reason and scope.

### 2.1 What it is

**Summary.** The system keeps a design corpus of roughly thirty markdown documents called optics, each owning one kind of fact, such as how components connect, how failures spread or the branch policy. Four rules define it. Each fact is stated in one optic only, and the others point to it. A top document, `FOUNDATION.md`, outranks the rest. Each optic carries named checks with a one-line command, 339 in all, run by a single command. Anything countable is computed when checked, never written down: an earlier index that stated a file count and a floor of 18 was out of date within weeks, and eleven optics could have been deleted without failing it.

**Original.**

The reference implementation carries a structured design corpus of roughly thirty markdown "optics",
each owning one class of fact: component topology, failure propagation, configuration shape, session
naming, cron registry, branch policy, and so on. Four properties define it.

**One owner per fact.** Any given fact is stated in exactly one optic; others cross-reference. This
is the property that decays first and matters most — the same fact in two files becomes two facts as
soon as one is edited.

**An apex document that outranks the rest.** `FOUNDATION.md` holds the principles every optic
derives from. When an optic contradicts it, the optic is the bug.

**Executable verification.** Each optic carries `verify:` blocks in its frontmatter — named checks
with a one-line command. A single command runs all of them (currently 339). A documentation claim
that cannot be checked is prose; one that can be is an invariant.

**Derivation over enumeration.** Anything countable is computed at check time, never written down.
An earlier version of the index asserted a file count in prose and `>= 18` in its verify block; both
were stale within weeks, and the floor had been outgrown so thoroughly that eleven optics could have
been deleted without failing it.

### 2.2 Three different jobs, three different homes

**Summary.** A rule in the system's own documents said, in substance: if I might forget it, enforce it with code; documentation is for explaining why. An agent took it as a rule about how to write documents and began pasting enforcement programs into them. The rule meant that the agent's own behaviour must be enforced by running code, because a language model forgets written instructions. The fix named three jobs and gave each a home: EXPLAIN in prose and diagrams, ENFORCE in running code (hooks, gates, guards), CHECK in scripts behind a one-line pointer. The paper's lesson: an ambiguous rule is an attack surface, because an agent over-applies a line that reads clearly to a person, and the cure is to name the jobs the rule could serve.

**Original.**

The corpus went through one significant structural correction, and it generalises. A governance
principle in the system's own documentation read, in substance: *"if I might forget it, enforce it
with code; documentation is for explaining why, not for enforcing rules."* An agent read that as a
rule about **how documentation should be written** and began pasting enforcement programs inline
into the markdown. The intended meaning was **runtime enforcement of the agent's own behaviour** —
it exists because a language model forgets documented instructions, so anything that must be obeyed
has to sit on the execution path.

The resolution was not a corrected rule but a *disambiguated* one — naming the three distinct jobs
that had been sharing one home:

| Job         | Home                                 | Wants                                   |
| ----------- | ------------------------------------ | --------------------------------------- |
| **EXPLAIN** | prose and diagrams                   | ambiguity is allowed, often the point   |
| **ENFORCE** | running code: hooks, gates, guards   | must not depend on being remembered     |
| **CHECK**   | scripts behind a one-line pointer    | linting, review, and its own tests      |

The failure was putting CHECK inside EXPLAIN. Once the three are named, the original rule is
unambiguous and the misreading is unavailable.

> **Ambiguity in a governance document is not a writing defect to be polished away. It is an attack
> surface, and the mitigation is to name the distinct jobs a rule could be serving.** A one-line
> principle that reads cleanly to a human is exactly the kind of artifact an agent will over-apply,
> because natural language does not carry its own scope.

### 2.3 The honest assessment

**Summary.** The paper weighs the design corpus both ways. It gave orientation (one file read in place of a twenty-minute search), a home for the reasons behind values, checks that fail the build, and ratchets that stop a count from rising. It did not catch four dead features: on 2026-08-04 all 339 checks passed while, for one, Fractal reflection had 2,466 runs and zero successes in eight weeks. Documentation checks confirm shape, not liveness, and the corpus also missed a command-injection flaw. A capability registry built in response found that only 24% of capabilities gave any signal, so the corpus had left three-quarters of the system unwatched.

#### Part: What the design corpus did buy

**Summary.** Asked how much the design corpus helps an agent code, the paper first lists four gains. One file read answers "which part of the system owns this?", which used to take a twenty-minute search, and each document keeps the reason behind a value, such as why it is 8,000 and not 12,000. Executable checks turn a documented rule into a failing build, and ratchet checks let a measured count fall but never rise: merging twelve duplicate token estimators is too big for one session, while forbidding a thirteenth costs nothing.

**Original.**

Oscar asked for a candid answer to "how much better does this let you code?" Here it is, in both
directions.

**What it demonstrably bought.**

*Orientation without archaeology.* The single largest cost in a large unfamiliar codebase is
establishing what is true before acting. A per-optic corpus with a routing index turns "which
subsystem owns this?" from a twenty-minute search into one file read. This is real and it compounds.

*A place to put the reason.* Most code comments record what a line does. The expensive knowledge is
why a specific value is 8,000 and not 12,000, and what happened the last time someone raised it. An
optic gives that a home with a stable address.

*Regressions that fail the build.* Executable invariants convert a documented rule into a gate.
Several checks in the corpus have bitten, and two were repaired during this session's work because
the code had legitimately moved past what they asserted — which is the system working.

*A ratchet discipline that survives backlogs.* Several gates enforce a measured status quo that may
fall but never rise. This matters because a gate demanding perfection on day one gets switched off
by Friday. Collapsing twelve duplicate token estimators is not a session's work; forbidding a
thirteenth is free.

#### Part: Four dead features, every check passing

**Summary.** On 2026-08-04 all 339 checks passed while four main features were dead. Fractal reflection had 2,466 recorded runs and zero successes over eight weeks, semantic memory search had 5,258 chunks indexed and zero vectors, Overseer nudges had 188 permission refusals and zero nudges, and ENGRAM ingestion had done nothing on every turn since 2026-07-28. The paper's explanation is that a documentation check confirms shape (a file exists, a symbol is exported, two numbers agree), not liveness, and all of that can be true of code that has not run successfully in two months.

**Original.**

**What it demonstrably did not buy, which is the more useful half.**

On 2026-08-04, with all 339 invariants passing, four headline features were simultaneously dead:

| Feature                | State                                                            |
| ---------------------- | ---------------------------------------------------------------- |
| Fractal reflection     | 2,466 recorded runs, **zero** successes, for eight weeks          |
| Semantic memory search | 5,258 chunks indexed, **zero** vectors                            |
| Overseer nudges        | 188 permission refusals, **zero** nudges                          |
| ENGRAM ingestion       | a no-op on **every** turn since 2026-07-28                        |

Not one of these was caught by the corpus, and it is worth being exact about why, because the reason
is structural rather than a matter of insufficient coverage.

> **A documentation invariant asserts SHAPE, not LIVENESS.** It checks that a file exists, that a
> symbol is exported, that a call site delegates to the canonical helper, that two numbers agree.
> Every one of those can be true of a subsystem that has not executed successfully in two months.

#### Part: A missed flaw, then a liveness registry

**Summary.** The corpus also missed a command-injection flaw in the harness's own enrichment path, because none of its documents asks whether any string reaches a shell. The system's response was a second instrument: a capability registry that rates every plugin, hook, RPC and store as OBSERVED, DECLARED or BLIND and only lets the BLIND count fall. Its first run found that 24% of capabilities gave any signal at all and the 185-method gateway RPC surface gave none, so the corpus had made the system explainable and left three-quarters of it unwatched.

**Original.**

The corpus also failed to prevent a command-injection vulnerability in the harness's own
enrichment path, described in the companion security paper — it had an optic on failure
propagation, an optic on inspection primitives, and a rule about canonical derivations, and none of
them asks "does any string reach a shell?"

**The correct conclusion is not that the corpus is worthless.** It is that documentation gates and
liveness gates are different instruments measuring different things, and a system with only the
first will believe itself healthy while dead. The reference implementation's response was to build
the second: a derived capability registry that scores every plugin, hook, RPC and store as
OBSERVED, DECLARED or BLIND, and ratchets the blind count downward. Its first measurement found that
**24% of the system's capabilities had any signal at all**, and that the entire 185-method gateway
RPC surface had none.

That number is the honest measure of what the design corpus was worth on its own: it made the
system explicable, and it left three-quarters of it unwatched.

### 2.4 Inherited enforcement: how a check written in March directed work in August

**Summary.** A check added in March 2026 by the upstream project, the one this system was forked from, forbade extensions to import core code by relative path. It had sound reasons in that project (about 150 detachable extensions) and no comment giving them. In August it reported 39 violations in the fork, where it was meaningless, and the agent took them as fact: it proposed about 65 file edits that would change no behaviour, until the owner asked four plain questions. The paper calls a check that fails wrongly more expensive than one that passes wrongly, because it demands work at once. Two practices follow: a check carries its own reason and scope, and an exemption is defined by something a command can test, such as whether a path exists in `upstream/main`.

#### Part: A March check without its reasons

**Summary.** In March 2026 the upstream project this system is forked from added a CI check that forbids an extension from importing core code by relative path. Four days later its authors cleaned the violations to zero and deleted the baseline, so the count could never climb again. The rule makes sense for a project that keeps about 150 extensions, each with its own `package.json`, as detachable units, but the check carries no comment saying so.

**Original.**

The three-jobs split in §2.2 has a failure mode that only appears over time, and it is worth its own
subsection because the reference implementation walked into it while this paper was being written.

In March 2026, contributors to the upstream project this system is forked from added a CI check
forbidding an extension from importing core code by relative path. Their history shows it was taken
seriously: introduced with a baseline of known violations, then — four days later, in a commit
titled *"remove relative extension boundary escapes"* — the violations were cleaned to zero and **the
baseline mechanism was deleted**, so the count could never climb again. It was tightened twice more
that spring and was still being maintained in July. For that project it is a live, load-bearing
constraint, and the reasoning behind it is legible from what they do: they keep ~150 extensions each
with its own `package.json` and treat an extension as a detachable unit.

The check carries **no comment explaining any of that.**

#### Part: How the check steered the agent

**Summary.** In August the same check reported 39 violations in the fork, which upstream's authors have never seen and which takes no more merges from them. The agent repeated "39 violations" as a fact, proposed about 65 file edits (roughly 26 new SDK entry points and 39 import rewrites) that would change no behaviour, and called a publish "blocked"; it took the owner four plain questions to stop it. The paper's reading is that a failing check is a standing order with no author, scope or expiry, and that for an agent a red build is close to the only objective fact around, so its default is to turn it green.

**Original.**

In August, in a fork those authors have never seen, whose git lineage is no longer comparable to
theirs, which publishes nothing to a package registry and takes no further merges from them, that
check reported 39 violations. What happened next is the interesting part, because nobody at upstream
caused it and nobody at the fork wanted it:

- The agent adopted the check's vocabulary without inspecting it — writing *"39 violations"* as
  though violation were a fact about the code rather than a verdict of one program.
- It proposed the remedy the check implies: roughly 26 new SDK entry points and 39 import rewrites,
  about 65 file edits, producing **zero behavioural change** — every one of those imports resolves
  correctly today and always has.
- It described a publish as *"blocked"* by them.
- Correcting this took the system's owner asking four questions in plain language: *what does a
  violation mean, who sets the rule, what rule is it, and toward what end was it designed?* None of
  those four questions is answerable from the check itself, and the agent had answered none of them
  before proposing the work.

**The delivery mechanism is an executable that fails.** Not a convention, not a style guide, not a
document — those decay into being ignored. A failing check *compels*, it has no expiry date, it
names no author, and it states no scope. It is a standing instruction to every future contributor,
carried in the repository, that outlives the conditions that justified it and cannot notice when
they lapse.

An agent is unusually susceptible to it. A red build is close to the only thing in an agent's
environment that resembles an objective fact — everything else is text it must interpret — so it
gets treated as one. Told that something is a violation, the agent's default is to make the light
green, not to ask on whose authority the light was installed.

#### Part: A false failure, and two practices

**Summary.** The checks in section 2.3 were passing and meaningless; this one was failing and meaningless, which the paper calls the more expensive case, because a false failure demands work at once and the work looks like diligence. Two practices follow: a check must carry its own reason and scope, and an exemption must be defined by something a command can test. Asked to exempt upstream code, the agent matched folder names starting `tinkerclaw-` and so missed three of the five offending extensions; the testable rule was whether the path exists in `upstream/main`.

**Original.**

**And note the inversion against the rest of this paper.** §2.3's failures were gates that were
*green and meaningless*: 339 invariants passing over four dead features, shape mistaken for liveness.
This is the opposite — a gate *red and meaningless*. The red case is the more expensive of the two.
A false green costs nothing until something breaks; a false red demands work immediately, keeps
demanding it, and the work it demands looks like diligence.

Two practices follow, and the second is the one this system got wrong twice in an afternoon.

**A gate must carry its own rationale and its own scope**, because the single thing a check cannot
do is tell you when it stopped applying. Upstream's intent was in fact recoverable — it was legible
in four months of their commit history, freely readable, and nobody looked until prompted. An
undocumented gate does not preserve a decision; it preserves only the decision's *effect*, stripped
of the conditions that made it correct.

**And when you do decide a rule no longer applies, define the exemption from something checkable.**
Asked to scope the check to upstream-owned code, the agent wrote a predicate matching directory
names beginning `tinkerclaw-`. Three of the five offending extensions — `overseer`,
`whatsapp-tinkerclaw`, `auth-reload` — are fork-authored and do not carry that prefix, so the
exemption was wrong for the majority of what it was written for. A checkable definition was sitting
right there: *does this path exist in `upstream/main`?* That is a command, not a guess. Inventing a
second definition of an existing concept is the duplicate-derivation failure of §2.1 wearing the
clothes of a fix — and it very nearly shipped as a green gate, which is the worst outcome available:
a rule that appears enforced, is not, and now lies about which code it covers.

## 3. Four premises about belief

**Summary.** Progress on a large system depends less on capability than on a few beliefs about acting on incomplete evidence. The paper states four, each with the incident behind it. Never answer "no" before trying: a prompt "too large" for a command-line argument was 811 bytes against a limit of 131,072. Trace the assumptions under a conclusion: a 120-second ceiling, set from how long the work ought to take, cut off runs whose 90th percentile was 128.5 seconds. When a conclusion says something cannot be coded, change the premise: a capability list that looked impossible to write was derived from the code instead, 576 rows. A check you did not keep is an anecdote: a fix called "verified by differential test" had no test in the repository.

**Original.**

The difference between an agent that makes progress on a large system and one that stalls is not
mostly capability. It is a small number of beliefs about what to do when the evidence is
incomplete. Each of the four below is stated as an instruction, followed by the incident that
proves it.

### 3.1 Never answer "no" before trying

**Summary.** A confident claim that something is impossible, never tested, usually rests on one premise nobody checked. A code comment said a prompt was "too large for CLI `--text` argument", so the prompt went through a temporary file and a shell; the prompt was 811 bytes and the platform's per-argument limit is 131,072, a claim wrong by a factor of 160. The workaround had cost a `/bin/bash` call on a hot path and a predictable file in a world-writable folder. The rule: an impossibility claim is a hypothesis, and testing it almost always costs less than the workaround it justifies.

**Original.**

The failure mode is a confident, well-argued impossibility claim that was never tested. It is
especially seductive because the argument is usually *locally* sound — it just rests on a premise
nobody checked.

**The incident.** A comment in the reference implementation justified writing a prompt to a
temporary file and shelling out with `cat` rather than passing it as an argument: *"too large for
CLI `--text` argument"*. The prompt is 811 bytes. The per-argument limit on the platform is 131,072.
The claim was wrong by a factor of 160, had been true of nothing, and had bought a `/bin/bash` on a
hot path plus a predictable file in a world-writable directory. It survived for as long as it did
because it was phrased as a fact and read as one.

The instruction is not "be optimistic". It is: **an impossibility claim is a hypothesis, and the
cost of testing it is almost always lower than the cost of the workaround it justifies.**

### 3.2 Trace the assumptions under a conclusion

**Summary.** A wrong conclusion usually comes from a premise taken on so early that it no longer looks like one. A cognitive lane timed out on roughly one run in eight, because its 120-second ceiling had been set from how long the work ought to take. Across 291 recorded runs the median was 66 seconds, the 90th percentile 128.5 seconds and the maximum 260, in a record the system was already keeping. The warning sign is a sentence like "X should be well under Y": a prediction dressed as a specification.

**Original.**

When a conclusion is wrong, the error is rarely in the reasoning. It is in a premise that was
acquired so early it stopped looking like a premise.

**The incident.** A cognitive lane in the reference implementation timed out on roughly one run in
eight. The ceiling was 120 seconds, documented as *"triage runs at low thinking and should finish
well under this."* Measured across 291 recorded runs: median 66 seconds, **90th percentile 128.5
seconds**, maximum 260. The ceiling had been set from an assumption about how long the work *ought*
to take, and no one had re-derived it from the ledger the system was already writing.

The tell is a specific kind of sentence: *"X should be well under Y."* That is a prediction wearing
the clothes of a specification.

### 3.3 If the conclusion says it cannot be coded, revise the assumptions

**Summary.** The strongest of the four: everything can be coded, so a conclusion that something is impossible points to a bad premise. Listing which of the system's capabilities can be observed looked impossible, because they are spread across plugins, hooks, RPCs, crons, stores and UI panels, and a hand-written list would be out of date at once. Dropping the premise that the list must be written made it easy: it is derived from the code on every run, 576 rows in under two seconds, each row carrying the query that produced it. An impossibility usually belongs to one way of reaching the goal that has been mistaken for the goal.

**Original.**

This is the strongest of the four and the one Oscar states most forcefully: everything can be coded.
When analysis terminates in "this is not possible", the correct response is to treat that as
evidence of a bad premise rather than a property of the world.

**The incident.** The question "which of this system's capabilities are observable?" looked
unanswerable — there is no registry of capabilities, they are spread across plugins, hooks, RPCs,
crons, stores and UI panels, and any hand-written list would be stale on arrival. The premise doing
the damage was *a capability list must be written*. Dropping it makes the problem easy: **derive the
list from the tree on every run.** The result is a 576-row registry computed in under two seconds,
with each row carrying the query that produced it so any human can re-derive it by hand.

The pattern generalises: an impossibility usually attaches to one *implementation* of the goal that
has been silently promoted to the goal itself.

### 3.4 A verification you did not keep is an anecdote

**Summary.** The weak point is running a check once, in a shell that scrolls away, and then writing "verified" in a lasting document. A paper said a security fix was "verified by differential test"; the test had been run, but no such test was in the repository, so nothing stopped the old pattern from returning. When the test was finally committed it kept a control case: it first shows that the old pattern does run the malicious payload on this machine, then that the new one does not. Without the control, "the malicious input did nothing" also passes when the payload is a dud, a binary is missing or the fixture has a typo.

**Original.**

The weakest link in agent work is not doing the check. It is doing the check once, in a shell that
scrolls away, and then writing "verified" in a durable document.

**The incident.** A security fix was recorded in a paper as *"verified by differential test: the
identical malicious path executes under the old pattern and does not under the new."* The
verification genuinely happened. **No such test existed in the repository.** Nothing prevented the
pattern returning, and the sentence would have been read for years as evidence that something
guarded it.

There is a sharper form of this rule, learned the same day. When the test was finally committed, it
kept its *control* case: it first proves the old pattern really does execute the payload on this
machine, and only then that the new one does not.

> **A safety assertion without a control is unfalsifiable.** "The malicious input did nothing" passes
> equally against a real fix, a dud payload, a missing binary, and a typo in the fixture. Only the
> control distinguishes "we are safe" from "the test is broken".

### 3.5 Why these four and not a longer list

**Summary.** Each premise ties a belief to its evidence: an impossibility claim to a test, a conclusion to its premises, a goal to one way of building it, a written claim to a kept record. They are not coding advice; an agent that holds them can work most coding advice out for itself.

**Original.**

Each of the four is a rule about *the relationship between a belief and its evidence* — how an
impossibility claim relates to a test (3.1), a conclusion to its premises (3.2), a goal to an
implementation (3.3), and a documented claim to a retained artifact (3.4). They are not coding
advice. An agent that holds them will re-derive most coding advice on demand; an agent that does
not will follow coding advice into a wall and describe the wall accurately.

## 4. The harness

**Summary.** The harness, the layer an agent runs on, decides what sections 1 to 3 can use: control flow written as code, a separate worktree when needed, schemas enforced at the tool-call layer, hooks that can deny a call, background jobs that wake the agent, and session lifecycle events. One lesson cost three days: a job that copies a session's memory was triggered by the session-end event, which did not fire, because long sessions rarely end cleanly; it now also runs at session start and writes a receipt every time. Harnesses still lack three things: a list of what a system can do and which parts ran recently, instruments at the dispatch points (one counter covered 337 methods), and any instruments in the browser interface, where 31 user-facing capabilities could not report failure.

### 4.1 What a harness is for

**Summary.** Sections 1 to 3 need the right primitives under the model, not a better model, and the harness, the layer an agent runs on, decides which of them exist. Those that mattered, in order: control flow written as code, each step sending work to an agent, so one script gives the same shape of work every time; a git worktree per worker when two units cannot share a tree, with the lease as the cheaper default; a schema forced at the tool-call layer; hooks that run before a tool call and can deny it, since a rule given only as advice is forgotten; background jobs that wake the agent when they finish, so it does not poll; and session lifecycle events.

**Original.**

Sections 1–3 are not achievable by a better model. They are achievable by a model with the right
primitives underneath it. A harness is the layer that decides which of the following an agent can
do at all, and the differences between harnesses are larger than they appear from a feature list.

The primitives that turned out to matter, in the order they mattered:

**Deterministic orchestration over non-deterministic workers.** The ability to write control flow —
loops, conditionals, fan-out, barriers — *as code*, and have each step dispatch an agent. This is
the primitive §1 rests on. A planner that asks a model "what should we do next?" at every step
inherits the model's variance at every step; a script that says `for each unit: draft, then apply
under a lease` does not. The valuable property is not parallelism, it is **reproducible topology**:
the same script produces the same shape of work every time, and only the contents vary.

**Isolation on demand.** Giving a worker its own git worktree so that parallel mutation cannot
collide at all. This is strictly stronger than a lease and strictly more expensive, and the right
default is the lease — but the escape hatch has to exist for the cases where two units genuinely
cannot share a tree.

**Structured output that is enforced, not requested.** Asking a model for JSON and parsing the
result is a retry loop you will write badly. Having the harness force a schema at the tool-call
layer, so a mismatch is retried before it reaches your code, removes an entire class of glue.

**Hooks on the execution path.** The ability to run a check *before* a tool call, synchronously,
with the power to deny it. §2.2's ENFORCE column is only available if this exists. A harness that
can only advise the model — "please do not do X" — cannot implement a guard, because advice is
subject to the same forgetting the guard exists to defeat. The reference implementation's
deterministic action floor works precisely because it denies the call rather than asking nicely.

**Background work with completion notification.** Long operations that do not block the turn, and
that wake the agent when they finish. Without it, an agent polls — and polling loops are where
agents burn budget doing nothing.

**Session lifecycle events.** And here is the lesson this session paid for, which belongs in any
honest treatment of the primitive rather than in a footnote.

### 4.2 Lifecycle events: prefer the guaranteed one

**Summary.** The system copies what a Claude Code session learned into the long-term memory of the persistent agent. The copy ran on `SessionEnd`, the obvious moment, and produced nothing for three days: the script worked (a dry run found 33 pending events at once), but long sessions are far more often abandoned, compacted or killed than cleanly ended. It now also runs on `SessionStart`, which always happens, and a state file lets only the first of the two do the work. The script also reported only to stderr, which a hook throws away; it now writes a receipt on every outcome, because "nothing to do" and "never ran" had looked the same.

**Original.**

The reference implementation syncs a Claude Code session's curated memory into the persistent
agent's long-term store, so that what one ephemeral session learns is available to the other. It was
wired to a `SessionEnd` hook — the semantically obvious choice, since a summary belongs at the end.

It produced nothing for three days. The script was never broken; a dry run three days later emitted
33 pending events immediately. **`SessionEnd` had simply not fired**, because long-lived sessions
are far more often abandoned, compacted, or killed than cleanly ended.

The fix is to trigger on an event that is guaranteed rather than one that is tidy. A session that
never ends still always *starts*, so the same sync now runs on `SessionStart`, picking up whatever
the previous session left behind. Both are wired; a state file dedupes, so whichever fires first
wins and the other reports "nothing new".

> **Trigger on the event that is guaranteed to happen, not the one that is semantically correct.**
> "At the end" is where a summary belongs conceptually, and is the moment least likely to arrive.

There is a second lesson stacked on the first. The script reported only to stderr, and a hook's
stderr goes nowhere, so "did it run?" had no answer short of comparing two file mtimes and
inferring. It now writes a receipt on *every* outcome — including "nothing new" — because **"ran and
had nothing to do" and "never ran at all" being indistinguishable is exactly what hid the outage.**
A receipt with a stale timestamp says "not running" as loudly as a missing one; an absent log line
says nothing at all.

### 4.3 What is still missing

**Summary.** The paper names three things harnesses do not yet provide. None can say what a system can do and which of those things ran recently; this system had to derive that from its code and found three-quarters of its capabilities gave no signal. Instruments get added where something once hurt, so hooks were 71% covered and RPCs 0%; one wrapper at the hook registrar and one counter at the gateway dispatcher then covered every plugin hook and 337 methods, and no harness offers this built in. And the browser interface has no instruments at all, because the liveness registry runs on the Node side, so 31 user-facing capabilities had no way to report their own failure.

**Original.**

Stated as gaps rather than complaints, because each is a concrete thing a harness could provide.

**No first-class notion of a capability.** Every harness surveyed can register a tool, a hook, a
command. None can answer "what can this system do, and which of those things has run recently?" The
reference implementation had to derive that from the tree because nothing else could produce it,
and the derivation found that three-quarters of its own capabilities had no signal at all.

**Instrumentation is per-author, so coverage follows scar tissue.** Where instruments exist, they
exist because something once hurt. In the reference implementation, hooks were 71% covered and the
RPC surface 0% — not by design, but because hooks had broken visibly before and RPCs had not. The
fix in both cases was to instrument the *dispatch chokepoint* rather than the individual sites: one
wrapper at the hook registrar covered every plugin hook; one counter at the gateway dispatcher
covered 337 methods. A harness could offer this natively, and none does.

**The UI is structurally unobservable.** The reference implementation's browser-side interface
contains zero instrument declarations, because the liveness registry is a Node-side facility and the
UI does not run there. Thirty-one user-facing capabilities are therefore invisible to the only
report anybody reads. This is a boundary problem, not neglect, and it is the reason the architect's
recurring complaint — *"the visualizer does not work nor spits anything useful"* — was so hard to
act on: there was no channel through which it could have reported its own failure.

## 5. What this adds up to

**Summary.** The four parts make one argument: an agent codes well when it can work beside other agents without corrupting shared state, find its way in an unfamiliar system, hold beliefs that fail loudly, and run on a harness that allows all three. The failures carry it, from 339 passing checks beside four dead features to a ceiling that cut off one run in eight for two months; each was cheap to fix once seen and hard to see without an instrument. The thesis: what limits agent coding is not reasoning but how visible the agent's own work is, and that has to be built on purpose, because every default in the stack reports health.

**Original.**

The four parts are one argument.

An agent codes well when it can act concurrently without corrupting shared state (§1), orient itself
in an unfamiliar system without archaeology (§2), hold beliefs that fail loudly rather than quietly
(§3), and run on a substrate that makes the first three expressible (§4).

The negative results are the load-bearing ones. A design corpus with 339 passing invariants
coexisted with four dead features, because **shape is not liveness**. A security fix documented as
"verified by differential test" had no such test, because **a verification you did not keep is an
anecdote**. A memory bridge wired to the semantically correct lifecycle event produced nothing for
three days, because **the tidy event is not the guaranteed one**. A ceiling set from a plausible
assumption cut off one run in eight for two months, because **"should be well under" is a prediction
wearing the clothes of a specification**.

Each of those is cheap to fix once seen and nearly impossible to see without an instrument. That is
the whole thesis: the binding constraint on agent coding quality is not reasoning. It is
**observability of the agent's own work**, and it has to be built deliberately, because every
default in the stack — a silent early return, a catch-only log, a hook whose stderr is discarded, a
status line that says ok — conspires to report health.

## 6. Related work, and where this paper's claims sit against it

**Summary.** The paper sets itself only against what it checked in primary sources. In memory, the system already has its own copies of the field's four main mechanisms, from Zep/Graphiti and Mem0, so its gap is provenance, measurement and two correct parts left switched off; adding raw scores in different units is the clearest defect. On restraint, a companion paper suggests models are trained to act more than to hold back, but this paper's incidents needed an instrument, since the model never saw the fact that disproved its premise. On concurrency, frameworks differ mainly in role names, and the phase split seems not widely built. The paper does not claim its premises are new, only that breaking them cost weeks to months.

**Original.**

This section is deliberately short and deliberately hedged. It reports only what was checked against
a primary source during a structured mining pass; where a claim comes from a companion paper's
research rather than this one's, it is attributed rather than restated as an independent finding.

### 6.1 Memory and retrieval

**Summary.** This system already has its own copies of the four mechanisms that agent memory research has settled on. Like Zep/Graphiti it stamps each fact with when it was learned and when it was true, but the copy cannot fire across corpora, because a fact's identity includes its corpus tag. Like Mem0 it can sort each new fact into ADD, UPDATE, DELETE or NOOP, but it is set to always add. Graphiti fuses retrievers by rank; this system adds raw BM25, cosine and recency scores in different units, the clearest single defect found. Its events carry seven metadata fields and no origin. So the gap is not in algorithms: what is missing is provenance, measurement and, twice, switching a correct part on.

**Original.**

The agent-memory field has converged on four mechanisms, and the reference implementation already
contains fork-local ports of all of them — which is itself the finding.

**Bi-temporal fact invalidation.** Zep/Graphiti (arXiv:2501.13956;
<https://github.com/getzep/graphiti>) gives every edge four timestamps, separating *when the system
learned a fact* from *when the fact was true*, so a contradiction closes a validity interval rather
than deleting a row. The reference implementation ports this faithfully. §2's lesson applies
exactly: the port is correct and, for the cross-corpus case, structurally unable to fire, because
fact identity includes the corpus tag.

**Write reconciliation as a classification.** Mem0 (arXiv:2504.19413;
<https://github.com/mem0ai/mem0>) compares each candidate fact against similar existing memories and
emits ADD / UPDATE / DELETE / NOOP, separating extraction from update. Ported here, and wired to an
always-add default — present, inert.

**Rank-based fusion.** Graphiti's search recipes fuse parallel retrievers with Reciprocal Rank
Fusion, MMR, node-distance or a cross-encoder
(<https://help.getzep.com/graphiti/working-with-data/searching>). RRF fuses on *rank*, which is what
makes heterogeneous retrievers combinable at all. The reference implementation instead sums raw
scores from BM25 and cosine retrievers plus a recency term and reranks the mixture — arithmetic on
incommensurable units, and the clearest single defect the mining pass found.

**Provenance to the source episode.** Graphiti retains lineage from every derived fact to the
ingestion that produced it. The reference implementation's event metadata carries seven fields and
no origin, which is why a merged corpus could not be evaluated even if it were measured.

The synthesis: **the gap between this system and the field is not algorithmic.** Every headline
mechanism is present. What is absent is provenance, measurement, and — in two cases — a wiring
decision that leaves a correct implementation switched off.

### 6.2 Ambiguity, restraint, and why the harness must supply them

**Summary.** A companion security paper (J9) suggests that knowing when not to act is a separate skill from knowing how to act, and that current models are trained for the second; its figures are left in that paper. This paper's own conclusion is narrower: in every incident of sections 2 and 3 the system acted confidently on an unchecked premise, and a better model would not have helped, because the model never had the fact that disproved it. Nobody read the record of run times, nobody measured the prompt, nobody looked for the test. An instrument would have found each of these, and did.

**Original.**

The companion security paper (J9, notes 8–10) surveys the benchmark landscape for agent
*disambiguation* and *restraint*, and the results reported there are directly relevant to §3 of this
paper: they suggest that knowing **when not to act** is a separate competency from knowing **how to
act**, and that current models are trained for the second. That survey's figures are not reproduced
here — they belong to that paper, and restating them second-hand is precisely the error §3.4 warns
about.

The structural conclusion this paper draws from it is narrower and stands on its own evidence:
**every incident in §2 and §3 was a case of the system acting confidently on an unverified
premise**, and in none of them would a better model have helped, because in none of them did the
model have access to the disconfirming fact. The ceiling was wrong because nobody read the ledger.
The "too large for `--text`" claim was wrong because nobody measured the file. The differential test
was missing because nobody looked for it. Restraint supplied by the model would not have found any
of these; an instrument would, and did.

### 6.3 Concurrency

**Summary.** The main open-source multi-agent frameworks differ mostly in their names for roles (planner and worker, manager and agent, crew and task). Where agents share files, they usually allow a single writer or give each agent a sandbox and merge afterwards. The paper's modest claim, not widely built as far as its survey found, is the phase split: optimistic concurrency for reading and drafting, locking for applying, inside one unit of work.

**Original.**

§1's lease model is, as stated there, a composition of two textbook disciplines rather than a new
one. The mining pass surveyed the major open-source multi-agent frameworks and found that they
differ mostly in *role vocabulary* — planner/worker, manager/agent, crew/task — rather than in
coordination semantics over a shared mutable workspace. Where a shared filesystem is involved, the
common answers are a single writer, or per-agent sandboxes with a merge step.

The claim this paper makes is modest and, as far as the pass established, not widely implemented:
**the phase split.** Applying optimistic concurrency to the expensive phase (read and draft) and
pessimistic locking to the cheap one (apply), within a single unit of work, is what makes the
expensive part parallel without making the mutation unsafe. It is a small idea; its value is
entirely in which phase gets which discipline.

### 6.4 What this paper does not claim

**Summary.** The paper does not claim its four premises are new: it shows, with dated incidents, that breaking each one cost weeks to months on a system that was otherwise well documented, tested and maintained. Nor does it offer its design corpus as a model for all documentation. It claims, with a measurement, that documentation checks and liveness are separate, and that a system with only the first will believe itself healthy while dead.

**Original.**

It does not claim the four premises in §3 are novel; each is folk wisdom somewhere. It claims that
they are *load-bearing*, and offers dated, first-party incidents in which violating each one cost
weeks to months on a system that was otherwise well-documented, well-tested, and actively maintained.

It does not claim the design corpus of §2 is the right structure for design documentation in
general. It claims, with a measurement, that documentation invariants and liveness are orthogonal,
and that a system carrying only the first will believe itself healthy while dead.
