Repository navigation
docs(memory): say what happens to lines of the memory file the server cannot read - #5706
Conversation
… cannot read Which line shapes are skipped, which of them log to stderr and which do not, that every save keeps them and they count toward MEMORY_MAX_FILE_BYTES, that no tool reaches them, and that the fix is a hand edit with the clients stopped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
|
| Tools | Prompts | Resources | Resource templates | |
|---|---|---|---|---|
| Base | 9 | 0 | 1 | 0 |
| Head | 9 | 0 | 1 | 0 |
Updated by this run for f0e16a0a21faba9bc171a515986c6512e4565fad.
There was a problem hiding this comment.
🟡 Changes recommended
The README misstates skipped-record behavior when a readable namesake exists and omits stopping all server processes before manual edits, potentially misleading users about invalid-line removal and allowing ongoing writes to overwrite repairs.
2 open issues
What changed in this PR
Documents how the memory server handles unreadable file records, addressing #5609 without changing server behavior.
Changes:
- Explains which lines are skipped and which produce stderr messages.
- Clarifies preservation on save, blank-line removal, and file-size accounting.
- Describes tool limitations and manual repair steps.
| File | Description |
|---|---|
src/memory/README.md |
Adds guidance on unreadable records, their persistence, and manual repair. |
Review effort: Balanced
… and stop HTTP servers before a hand edit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
Copilot round 1: 2 findings, both fixed in f0e16a0. Both were defects in the passage this PR adds.
Gate green on f0e16a0. Requesting round 2. |
|
Copilot round 2 on f0e16a0: clean, no open findings, and both round-1 findings shown as resolved. The review loop ends on this first clean round. |

Closes #5609
Description
Adds a Lines the server cannot read passage to
src/memory/README.md, right after Limiting how large the graph grows. It states which line shapes are left out of the loaded graph, which of them log to stderr (and that JSON arrays and objects with a missing or unknowntypedo not), that every save writes them back after the graph's own lines while blank lines are dropped, that they count towardMEMORY_MAX_FILE_BYTES, that no tool reaches them, and that the fix is a hand edit with the clients stopped.Each claim was checked against
loadGraphWithUnreadableandsaveGraphinsrc/memory/index.tsonv2/main, against__tests__/invalid-record-removal.test.ts(#5541), and against the built server (below). The passage quotes no tool's result text, only the stderr messages, so it does not collide with the sibling PRs that changecreate_relationsand delete-count wording.Server Details
Motivation and Context
The README mentioned unreadable lines only in passing, under the write limits, so a user who saw a
Skipping …line on stderr, or aNot foundfor an entity visible in the file, had nowhere to read what was happening or how to fix it. The issue's comments include a per-shape table showing that not every skipped line logs; the passage follows that table, re-verified here.How Has This Been Tested?
Docs only, so a targeted probe: the built server (
src/memory/dist/index.js, 2.2.2) driven with the Inspector CLI 2.12.0 over stdio against a planted memory file holding one valid entity, then one line of each shape, then a blank line:read_graph,--protocol-era legacyand--protocol-era modern: both return onlyAlice, and both print exactly five stderr lines for eight skipped lines. The array, thenoteobject and the object with notypeprint nothing:delete_entities["Broken"]:Deleted 0 of 1 entities. Not found: Broken.create_entitiesBob, then the file:AliceandBobfirst, then the eight skipped lines verbatim in their original order; the blank line is gone.No LLM-client run: the change has no client-observable surface.
Breaking Changes
None.
Types of changes
Checklist
npm run changeset) if this changes what a TypeScript server publishes (not applicable: README only, no change to the published server's behavior)🤖 Generated with Claude Code