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: one subject and one object; supersedes is a version number; an unfollowable reference names no memory (#399)

github-actions[bot]6148ed129c12
diff --git a/protocol/CHANGELOG.md b/protocol/CHANGELOG.md
index 2246246e..d9697361 100644
--- a/protocol/CHANGELOG.md
+++ b/protocol/CHANGELOG.md
@@ -84,6 +84,16 @@ The graph read without `around` starts from the records of the memory **and of w
the scope a search has; the sixth patch's text said the memory alone, which returned nothing for a
memory whose records are all kept in its children.
+A record names at most one `subject` and at most one `object`; a second of either is refused with
+`memory_invalid` (422). Stated because two implementations had to agree on it: the reference
+gateway kept such a record and a graph engine refused it.
+
+Two things the first server built from this chapter by another team read differently from the
+reference gateway, both the chapter's fault, both now said once: `supersedes` is the NUMBER of the
+version a version replaced (the example showed a record id, and the schema allowed either); and a
+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).
+
- **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 af48ee15..80bffe06 100644
--- a/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json
+++ b/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json
@@ -2301,9 +2301,9 @@
"supersedes": {
"type": [
"integer",
- "string",
"null"
- ]
+ ],
+ "description": "The number of the version this one replaced; null on the first."
},
"time": {
"type": "object",
@@ -2765,8 +2765,8 @@
},
"MemoryRecordRef": {
"type": "object",
+ "description": "A record by where it is. `memory_id` is absent on the far end of an edge the caller may not follow.",
"required": [
- "memory_id",
"record_id"
],
"properties": {
diff --git a/protocol/schema/uhp-2026-10-04.openapi.yaml b/protocol/schema/uhp-2026-10-04.openapi.yaml
index b659908c..128506ac 100644
--- a/protocol/schema/uhp-2026-10-04.openapi.yaml
+++ b/protocol/schema/uhp-2026-10-04.openapi.yaml
@@ -2749,7 +2749,7 @@ components:
attributes: { type: object, additionalProperties: true }
version: { type: integer }
status: { type: string, enum: [active, superseded, forgotten] }
- supersedes: { type: [integer, string, 'null'] }
+ supersedes: { type: [integer, 'null'], description: 'The number of the version this one replaced; null on the first.' }
time:
type: object
properties:
@@ -2886,7 +2886,8 @@ components:
limit: { type: integer, minimum: 1 }
MemoryRecordRef:
type: object
- required: [memory_id, record_id]
+ description: 'A record by where it is. `memory_id` is absent on the far end of an edge the caller may not follow.'
+ required: [record_id]
properties:
memory_id: { type: string }
record_id: { type: string }
diff --git a/protocol/schema/uhp-2026-10-04.schema.json b/protocol/schema/uhp-2026-10-04.schema.json
index af48ee15..80bffe06 100644
--- a/protocol/schema/uhp-2026-10-04.schema.json
+++ b/protocol/schema/uhp-2026-10-04.schema.json
@@ -2301,9 +2301,9 @@
"supersedes": {
"type": [
"integer",
- "string",
"null"
- ]
+ ],
+ "description": "The number of the version this one replaced; null on the first."
},
"time": {
"type": "object",
@@ -2765,8 +2765,8 @@
},
"MemoryRecordRef": {
"type": "object",
+ "description": "A record by where it is. `memory_id` is absent on the far end of an edge the caller may not follow.",
"required": [
- "memory_id",
"record_id"
],
"properties": {
diff --git a/protocol/versions/2026-10-04/memories.md b/protocol/versions/2026-10-04/memories.md
index 2ddb1f6f..1a0a82d7 100644
--- a/protocol/versions/2026-10-04/memories.md
+++ b/protocol/versions/2026-10-04/memories.md
@@ -182,7 +182,7 @@ A record is one thing a memory holds. Its `id` is the provider's and opaque to a
"attributes": { "account": "acme" },
"version": 2,
"status": "active",
- "supersedes": "hrec_11aa22bb33cc44dd55ee66ff77889900",
+ "supersedes": 1,
"time": {
"valid_from": "2026-09-30T00:00:00Z", "valid_to": null,
"written_at": "2026-10-01T17:02:11Z", "invalidated_at": null
@@ -201,7 +201,7 @@ A record is one thing a memory holds. Its `id` is the provider's and opaque to a
| `title` | One line that names the record: a document's heading, an entity's name, a fact's statement. Optional, at most 300 characters. A search matches it with the content. A record without one is named by how its content begins |
| `content` | What the record says: an ordered list of parts, text and files ([§4.3](#43-content)). MAY be empty when the record has a title: a fact is often one sentence |
| `attributes` | Structured fields. Free-form for core types; the type's schema for extension types ([§8](#8-types)) |
-| `version`, `status`, `supersedes` | A change appends a version and closes the one before it ([§5.3](#53-nothing-is-overwritten)). `status` is `active`, `superseded` or `forgotten` |
+| `version`, `status`, `supersedes` | A change appends a version and closes the one before it ([§5.3](#53-nothing-is-overwritten)). `version` counts from 1 and `supersedes` is the number of the version this one replaced, null on the first; a record keeps its `id` across versions. `status` is `active`, `superseded` or `forgotten` |
| `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)) |
@@ -229,8 +229,11 @@ A reference names a record by `memory_id` and `record_id`. The two ends need not
memory, or with the same provider.
- A reference is resolved when it is **read**, with the reader's privileges. A reader without `read`
- on the target memory receives `{ "memory_id", "record_id", "available": false }` and nothing
- else.
+ on the target memory receives `{ "record_id", "available": false }` and nothing else: not what
+ the reference means, and not the id of the memory it leads into, since naming that memory would
+ say that it exists.
+- A reviser sets the references it can see. One it was shown as unavailable it can neither restate
+ nor remove: a server keeps it as it was through a revision by that caller.
- Writing a reference does not require `read` on its target. A record promoted from a private
memory into a shared one keeps its source, and only those who may read the source can follow it.
@@ -256,6 +259,9 @@ between its two entities, labelled with the fact's text or its `attributes.predi
relationship with nothing to say, such as a section belonging to its document, is a bare reference
and needs no record of its own.
+A record names at most one `subject` and at most one `object`. A statement about two subjects is
+two records; a server refuses a record that names a second of either with `memory_invalid`.
+
A provider keeps the entities and relationships it has and no more
([§10.2](#102-the-capability-document)). One that keeps none still has a graph: its records and
the references between them.
@@ -527,7 +533,7 @@ draws them or an agent that asks what something is connected to.
"to": { "memory_id": "hmem_55d1…", "record_id": "hrec_dana…" },
"rel": "subject", "available": true },
{ "from": { "memory_id": "hmem_55d1…", "record_id": "hrec_job…" },
- "to": { "memory_id": "hmem_9f02…", "record_id": "hrec_77a1…" },
+ "to": { "record_id": "hrec_77a1…" },
"available": false }
],
"truncated": false,
@@ -539,7 +545,8 @@ draws them or an agent that asks what something is connected to.
`from` the record that holds it, `to` the record it names.
- Records are looked for in this memory and in what is below it that the caller may read, as a
search does. An edge may lead into any memory. Its target is a node only when the caller may
- read it; otherwise the edge is returned with `"available": false` and without its `rel`, and the
+ read it; otherwise the edge is returned with `"available": false`, without its `rel` and without the
+ memory its target is in, and the
target is not a node. This is the rule of [§4.2](#42-references), unchanged.
- `truncated` is `true` when there were more nodes than `limit`. `degraded` says what was cut
short, as a search's does.