Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

Memories: records that follow a source, and a kept file is not one of them (#404)

github-actions[bot]6259393bf421
diff --git a/protocol/CHANGELOG.md b/protocol/CHANGELOG.md
index d9697361..2400594b 100644
--- a/protocol/CHANGELOG.md
+++ b/protocol/CHANGELOG.md
@@ -94,6 +94,16 @@ version a version replaced (the example showed a record id, and the schema allow
reference the reader may not follow is `{ record_id, available: false }` with no `memory_id` (the
chapter returned the memory's id, which tells the reader that the memory exists).
+**Records that follow a source (§5.4), found by the second server.** A server that shows a
+document as one record per section cannot let a section be revised or forgotten through the memory:
+the next save of the document would undo it. The chapter had no word for that, so the server's
+refusal was undefined and a kept file was caught by the same refusal. Now: such a record carries
+`follows` (`kind`, `id`, `name` of its source), `revise` and `forget` on it are refused with
+`memory_unsupported` in words that say where the source is changed, and a client offers neither.
+A file someone kept is NOT such a record: its title and its line are its writer's statement, and
+it is revised and forgotten like any other; forgetting it takes the file out of reads, erasing it
+removes the bytes. Schema: `MemoryRecord.follows`, optional.
+
- **Memories** ([Memories](versions/2026-10-04/memories.md)), the Harness Memories sub-protocol,
optional at every class behind the `memories` capability. A memory is a named node in a tree:
it holds records and may have child memories. A grant gives a principal privileges (`read`,
diff --git a/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json b/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json
index 80bffe06..b869c35f 100644
--- a/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json
+++ b/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json
@@ -2343,6 +2343,24 @@
"$ref": "#/$defs/MemoryReference"
}
},
+ "follows": {
+ "type": "object",
+ "description": "Present only on a record the server derives from a source it keeps outside the memory (a section of a document). Such a record is not revised or forgotten through the memory.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "What the source is, in a word: `document`."
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string",
+ "description": "What a person calls the source."
+ }
+ },
+ "additionalProperties": true
+ },
"trust": {
"type": "string",
"const": "untrusted"
diff --git a/protocol/schema/uhp-2026-10-04.openapi.yaml b/protocol/schema/uhp-2026-10-04.openapi.yaml
index 128506ac..15469ec3 100644
--- a/protocol/schema/uhp-2026-10-04.openapi.yaml
+++ b/protocol/schema/uhp-2026-10-04.openapi.yaml
@@ -2759,6 +2759,14 @@ components:
invalidated_at: { type: [string, 'null'] }
written_by: { $ref: '#/components/schemas/MemoryWriter' }
references: { type: array, items: { $ref: '#/components/schemas/MemoryReference' } }
+ follows:
+ type: object
+ description: 'Present only on a record the server derives from a source it keeps outside the memory (a section of a document). Such a record is not revised or forgotten through the memory.'
+ properties:
+ kind: { type: string, description: 'What the source is, in a word: `document`.' }
+ id: { type: string }
+ name: { type: string, description: 'What a person calls the source.' }
+ additionalProperties: true
trust: { type: string, const: untrusted }
additionalProperties: true
MemoryContentPart:
diff --git a/protocol/schema/uhp-2026-10-04.schema.json b/protocol/schema/uhp-2026-10-04.schema.json
index 80bffe06..b869c35f 100644
--- a/protocol/schema/uhp-2026-10-04.schema.json
+++ b/protocol/schema/uhp-2026-10-04.schema.json
@@ -2343,6 +2343,24 @@
"$ref": "#/$defs/MemoryReference"
}
},
+ "follows": {
+ "type": "object",
+ "description": "Present only on a record the server derives from a source it keeps outside the memory (a section of a document). Such a record is not revised or forgotten through the memory.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "What the source is, in a word: `document`."
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string",
+ "description": "What a person calls the source."
+ }
+ },
+ "additionalProperties": true
+ },
"trust": {
"type": "string",
"const": "untrusted"
diff --git a/protocol/versions/2026-10-04/memories.md b/protocol/versions/2026-10-04/memories.md
index 1a0a82d7..bfffaa5c 100644
--- a/protocol/versions/2026-10-04/memories.md
+++ b/protocol/versions/2026-10-04/memories.md
@@ -205,6 +205,7 @@ A record is one thing a memory holds. Its `id` is the provider's and opaque to a
| `time` | When it was true in the world (`valid_*`) and when the memory held it (`written_at`, `invalidated_at`). A provider without validity leaves `valid_*` null |
| `written_by` | Who wrote it, `{ kind, id }` in the vocabulary of [§3](#who-acts-on-a-memory), stamped by the server from the authenticated caller; a client cannot supply it. When the provider wrote it, two more fields say why: `on_behalf_of`, the principal whose observation it was derived from, and `consolidation_id`, the run that concluded it ([§9.2](#92-consolidation-runs)) |
| `references` | Other records this one points at ([§4.2](#42-references)) |
+| `follows` | Present only on a record the server derives from a source it keeps outside the memory: `{ kind, id, name }` of that source. Such a record is not revised or forgotten through the memory ([§5.4](#54-records-that-follow-a-source)) |
| `trust` | Always `untrusted` on a read: what a memory returns is data, never instructions ([§13](#13-security)) |
### 4.1 Types
@@ -365,6 +366,26 @@ copies nothing; reading `as_of` a snapshot's time is the same read.
A provider declares how much of this it keeps, for content and for structure separately:
`versions` (every version), `snapshots` (only between named points), or `none`.
+### 5.4 Records that follow a source
+
+A server may keep something outside the memory and show it in the memory as records: a document
+people write in an editor, shown as one record for each of its sections. Such a record carries
+`follows`, which names where it comes from:
+
+```json
+"follows": { "kind": "document", "id": "doc_41c0…", "name": "Engineering guide" }
+```
+
+It changes when its source changes, by the server's own hand. It is not revised or forgotten
+through the memory, because the next change of its source would undo that. A server refuses
+`revise` and `forget` on it with `memory_unsupported`, in words that say where the source is
+changed, and a client offers neither on a record that carries `follows`. In every other way it is
+a record like any other: it is read, recalled and referenced, and its versions are kept as the
+provider declares.
+
+A file someone kept is not such a record. Its title and the line that says what the file shows are
+its writer's own statement, so it is revised and forgotten like any record ([§7](#7-files)).
+
## 6. Recall
### 6.1 Search finds the place, then the agent walks
@@ -560,6 +581,10 @@ A file enters a memory as a part of a record's content ([§4.3](#43-content)): u
revision whose content names other files is a new version of the record; the earlier version keeps
naming the files it had, for as long as the provider keeps history and the server keeps the files.
+Forgetting a record that holds a file closes it like any other: the file leaves every read that
+does not ask for history, and is still there for one that does. `erase` removes the bytes too, and
+names a copy it could not remove in `unreachable`.
+
`content.bytes` in the provider's capability document says where the bytes live: `kept` when the
provider stores them itself, `referenced` when it keeps the reference and the bytes stay with the
server's file store, living as long as that file does. `content.describes` lists the media types