Skip to content

Evaluate memory handoffs across coding agents, rules, skills, and prime - #5

Open
csells wants to merge 7 commits into
sjarmak:mainfrom
csells:csells/memory-routes-experiments
Open

Evaluate memory handoffs across coding agents, rules, skills, and prime#5
csells wants to merge 7 commits into
sjarmak:mainfrom
csells:csells/memory-routes-experiments

Conversation

@csells

@csells csells commented Sep 8, 2026

Copy link
Copy Markdown

Coding agents can finish an implementation while failing to preserve or correctly reuse the agreement behind it. This PR extends the adoption harness to test complete memory handoffs during ordinary issue work across Claude Code, Codex, OpenCode, and zcode, and records where those handoffs still fail.

The seven commits build directly on Stephanie’s adoption-harness-share, now at the same commit as main.

What is included

  • Isolated host adapters, real CLI qualifications, pinned CLI/model profiles, reusable experiment runners, independent artifact checks, and semantic trace audits.
  • Six-session policy lifecycles covering newly approved durable decisions, fresh-session direct lookup and search followed by full lookup, permanent revision, historical reproduction, and fully supplied work without duplicate capture.
  • Ordinary-task experiments where the launch says Work on <issue ID> and experiment-authored issues contain product requirements and approvals. Memory guidance lives in standing project rules, host instruction shims, and skills. The prime follow-up varies delivery through thin prime, rich prime, or a generic startup briefing.
  • Frozen manifests, actual retained records including omissions and mistakes, transcripts, costs, provider failures, and verification. Earlier studies that used task-specific memory instructions are preserved and explicitly distinguished from voluntary adoption.

Main findings

  • Policy guidance: 240 main sessions across ten model profiles, plus 24 separate normal-memory checks. Strict handoffs occurred in 2/20 generic and 9/20 workflow-occasion lifecycles. Both direct and search routes worked across several profiles. Overall artifact correctness did not improve: 95/120 generic versus 90/120 occasions.
  • Prime delivery: 196/216 planned sessions assessed, 120 correct artifacts, 9/34 complete initial captures, and 1/36 strict handoffs. Twenty assessed turns had provider denials without generation; another twenty slots remained unassessed. The incomplete matched coverage and observed failures do not establish a winning delivery surface.
  • Capture omission, incomplete or unsupported retained information, retrieval, application, historical mutation, and unnecessary work are assessed separately. Correct implementation and successful command execution alone do not certify a memory handoff.

These are small synthetic studies with legacy bd memory commands. They do not establish production reliability or validate the proposed new Memory bead type. Relevant-memory header selection by prime remains untested. The reports rank the smallest next improvements and separate measured findings from practitioner observations and proposals.

Review starting points

Most changed files are retained experimental evidence. Start with:

Validation

Recorded verification includes 617 targeted Python tests for the policy work, 908 TypeScript tests in an isolated Git checkout, and 76 targeted/shared prime checks with Ruff, Black, and strict mypy. All twelve real prime-delivery qualifications passed before scoring. Final audits verify 450 frozen source files and the retained results; completed model trials were not rerun or repaired.

The full Python suite remains non-green on this Mac: 4,814 passed, 44 skipped, 27 failed, and 12 setup errors. Those baseline failures and the exact scope of passing checks are retained in the policy verification and prime verification.

Related proposal: gastownhall/beads#5877

cc @donnabox @quad341 @sjarmak

Add matched ordinary-task experiments across installed coding agents and
model strengths. Preserve frozen conditions, actual retained memories,
transcripts, independent grading, and provider interruptions.

Report capture, retrieval, application, mutation, and unnecessary work
separately, with denominators, costs, and practical reliability limits.
Keep runtime caches and sensitive process inventory local.
@sjarmak

sjarmak commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Read both result documents end to end.

The capture bottleneck replicates here, from a different setup.

Our instrument is much smaller: 8-session batches against one frozen endpoint, a seeded store, and an ordinary coding task whose correct solution depends on a fact that only the seeded memory carries. Different corpus, different grader, one model. It agrees with your numbers on the part that matters most for the design.

The memory was delivered and read every time, and that bought less than you would expect. Our last batch (ladder-01, 8 paid sessions, 2026-09-07, Claude Code 2.1.263, the same build you pinned) recorded the seeded record as read, with its full content, in 8 of 8 sessions. Every row shows observed_content_reads: 1, empty_reads: 0, integrity_errors: [], with the bd memories --json call and its stdout preserved per row. The hidden check flipped in 5 of those 8. In the arm that did not hand the agent the answer outright, the record was read 4 times out of 4 and changed the outcome once.

So those three misses were not retrieval failures. The memory arrived, was read, and was not acted on. Your prime study reaches the same place from the opposite direction, by spending 216 sessions making the same instructions more prominent and getting 3 complete initial captures per arm regardless of arm. Both setups point at application rather than delivery.

What separated our 1-in-4 arm from the 4-in-4 arm was one sentence naming the destination in the vocabulary of the current task. That difference is in the record's own text. Delivery was identical across both arms, verified per row.

The question both documents set aside is the one we have in flight.

You write that the runs do not validate the proposed Memory bead type, and that a source-linked memory design deserves its own evaluation. Your ranked proposals then recommend a record that separates approved policy from inference from validation evidence and carries an explicit source, scope and version. That recommendation currently rests on judgment with no measurement under it.

Eight paid sessions are running on exactly that question as I write this. Both arms carry identical sentences in identical order, with an identical task, prompt and store. One arm is a single paragraph. The other splits the same words across labelled fields: observation, evidence, practice, evidence_scope, mechanism_class, transfer_claim, source. Only the labels and the line breaks differ. The residual wording delta is three tokens, derived mechanically from the two frozen source texts and recorded before the first call.

The reading rule was frozen before any spending. Four replicates per arm cannot separate a true 25 percent difference from noise, so a one-row gap will be reported as not separable rather than as a direction. The result posts either way. If the design has a hole in it, now is the useful time to say so.

Two mechanical findings in your traces look worth acting on regardless.

66 rejected bd invocations, 42 of them beginning with memory. That is a naming problem in the command surface. Aliases and error text that names the actual supported verbs would be cheap to add.

Memory search is literal substring matching, and you recorded agents searching a plausible multi-word phrase, getting nothing, and concluding the record did not exist while it sat in the store. An empty result that states the matching rule and offers a shorter query turns a silent miss into a recoverable one. That miss rate is measurable offline against our corpus with no paid sessions, and I am running that measurement now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants