Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

68.5 KB
Raw Blame

Harness memory architecture: what exists and what a cross-agent, cross-machine memory must fit into

Research date: 2026-10-09, against branch cross-agent at f810d23ece (main-equivalent). Read-only study of the repository. All paths are repo-relative. "Source" links point at repository files; line numbers are from this revision.

Status labels used below:

  • Implemented + tested: code exists and has executable unit/spec tests in the repo.
  • Implemented, unverified: code exists but the behavior was not demonstrated end-to-end (live app, real model, real user data).
  • Planned only: described in docs, no code.
  • Removed / disconnected: code existed and was removed from the running product.

1. The existing memory subsystem (companions/src/memory): modules, data model, pipeline

Takeaway

A substantial, carefully engineered coding-memory library exists (about 5,500 lines of non-test TypeScript in companions/src/memory/*.ts, about 6,000 lines of tests, plus a 2,600-line older "lessons" system). It is a single-machine, single-profile SQLite store with evidence-bound records, revisions, tombstones, an episode queue, LLM extraction through the user's own native CLI (Claude Code / Codex / OpenCode), FTS5 recall with scope/condition filtering, and content-free delivery receipts. Since PR #684 (2026-10-03) it is a library only: nothing starts it, core refuses its requests, and the native hook delivery path was deleted.

Cited Findings

Package and boundary

  • companions/ is a private package holding two subsystems "extracted from the core Harness CLI". It "builds as libraries. It does not start itself, install hooks, open a conversation, or connect the experimental desktop viewer. The core CLI can build and run without installing this package." — companions/README.md:3-6
  • Directory ownership: src/companion (characters, art), src/memory (observations, evidence, durable knowledge, review, recall, native inference adapters, earlier shared-lesson store), src/application (composition between the companion model and Memory), src/shared (policy and bounded inference contracts). Memory must not import Companions; Companions may import only src/memory/api.ts; import-boundary tests enforce this. — companions/README.md:8-19, companions/src/boundaries.spec.ts
  • Exports @openharness/companions/companion, /memory, /application. "Core no longer embeds those workers, constructs the feature services, adds recall to native hooks, or keeps a companion terminal alive for learning." — companions/README.md:21-26
  • The public Memory contract is tiny: CompanionMemory.recall(agentId, query) -> {text,status} plus types (RecallPacket, RecallRequest, MemoryAccess, runtime status, MemoryInference). — companions/src/memory/api.ts:1-13; entry exports CodingMemoryRuntime, MemoryClient, MemoryControl, MemoryExperimentSettings, MemoryPort — companions/src/memory/index.ts:1-7
  • Line counts (this revision): companions/src/memory/*.ts non-spec 5,495 lines; specs 6,015; memory/adapters 179; memory/lessons 2,594 (+3,334 spec); application 1,092; companion 11,576. Largest files: store.ts 1,331, runtime.ts 472, queue.ts 420, receipts.ts 347, notebook.ts 262, learner.ts 236. — measured with wc -l over the directory.

Module map (one line each; all under companions/src/memory/)

  • types.ts (179) — zod schemas for scope, source events, evidence, verification, drafts, topics, recall request/packet; canAccess, matches, conditionsOverlap. — types.ts
  • store.ts (1,331) — CodingMemoryStore: "Profile-owned SQLite core ... No provider calls or command execution"; all tables, ingest, propose/revise/correct, recall, forget, library, topics, maintenance. — store.ts:1-4
  • database.ts (6) — minimal Database/Statement interface over node:sqlite (loaded via cli/src/lib/sqliteBuiltin.js). — database.ts, store.ts:8
  • admission.ts (76) — canonical JSON, SHA-256 digest, secret/injection guard, evidence admission rules, proposal fingerprint. — admission.ts
  • capture.ts (171) — NativeMemoryCapture: incremental byte-cursor reader of host-registered native JSONL transcripts (Claude/Codex) and dispatch to OpenCode capture. — capture.ts
  • native.ts (98) — decodeMemoryRecord for Claude and Codex native transcript lines into role-tagged parts; strips sidechains, meta, injected system/hook blocks; pasted/fenced/quoted text becomes reference role, not user. Reuses cli/src/lib/normalize.js and cli/src/lib/sessionSearch/turns.js. — native.ts:1-87
  • opencodeSource.ts, opencodeRead.ts, opencodeCapture.ts, opencodeBinding.ts, opencodeInference.ts — OpenCode 1.18.34 SQLite reader, capture, credential binding and isolated inference (pinned to native version 1.18.34). — opencodeRead.ts:1-12, opencodeBinding.ts:1-12
  • adapters/opencodeMemoryPlugin.ts, adapters/opencodeRecallPlugin.ts — JS source embedded in Harness's OpenCode plugin; recall plugin calls http://127.0.0.1:${port}/api/hook/<route> and injects a synthetic: true text part. — adapters/opencodeRecallPlugin.ts:1-30,85
  • queue.ts (420) — MemoryQueue: durable episode intake (streams, jobs, leases), inference call accounting; "No provider calls or raw transcripts in job metadata". — queue.ts:1-60
  • budget.ts (29) — at most 6 model calls per rolling hour shared by extraction and notebook. — budget.ts:5-6
  • learner.ts (236) — MemoryLearner.tick(): claims a lease, builds the extraction prompt (coding-memory-v6) or notebook prompt (coding-notebook-v1), runs inference, commits proposals. — learner.ts:10-12,93-203
  • extractionEvidence.ts (59) — model returns excerpt references (s0p0) not quotes; host resolves exact text. — extractionEvidence.ts:1-12
  • inference.ts / claudeInference.ts / inferenceProcess.ts — restricted one-shot native CLI runs (see delivery/inference below).
  • account.ts (49) — reads native login identity (~/.claude.json oauthAccount.accountUuid, $CODEX_HOME/auth.json tokens.account_id), returns only a SHA-256 hash; refuses when API-key / custom-provider env vars are present. — account.ts:23-44
  • project.ts (45) — project identity from git rev-parse --git-common-dir (worktrees share), else the directory; "remotes never establish memory ownership". — project.ts:1-45
  • receipts.ts (347) — content-free recall receipts, usefulness feedback; "Printing a hook packet is not proof that a model received it." — receipts.ts:1
  • recallSources.ts (35) — coding_memory_sources v1 packet format with exact supporting excerpts. — recallSources.ts
  • notebook.ts (262) — derived per-project/topic "coding notebook" pages; "Jobs retain references and hashes, never another copy of source prose." — notebook.ts:1-40
  • visibility.ts (13) — SQL predicate applying source privacy (project inclusion, per-session exclusion, all lineage roots) before candidate limits. — visibility.ts
  • library.ts, control.ts — owner-facing library (list/projects/activity/notebooks/show/preview/apply) with a random two-minute capability for mutations. — control.ts:1-40
  • experiment.ts (51) — local per-account opt-in file {version:1, enabled, revision}, mode 0600, keyed by a 64-hex owner hash. — experiment.ts:7-50
  • runtime.ts (472) — CodingMemoryRuntime: host lifecycle, 2 s tick, capture, learner scheduling, prompt/MCP recall binding. — runtime.ts:1-120
  • client.ts (88) / worker.ts (27) / operations.ts (24) — the store runs in a worker_threads worker (harness-memory, 128 MB old-gen limit, 64 in-flight, 2 s default timeout) so "SQLite never executes on harnessd's input/event loop". — client.ts:11-50, worker.ts, operations.ts
  • ownerProcess.ts — "Loopback is not authentication": checks caller PID's UID equals the owner's. — ownerProcess.ts:9-14
  • hostSessions.ts — foreground-activity detection (new user turn interrupts background learning). — hostSessions.ts:1-10
  • evaluation.ts, evaluationReview.ts, evaluationContext.ts — offline diagnostic runner and reviewer for frozen synthetic cases. — evaluation.ts:1
  • Note: there is no retention.ts; retention is store.maintain() plus queue/receipt pruning, tested in retention.spec.ts.
  • lessons/ — the older "L1/L2 learning" system: signals → distill → git-backed lessons folder ~/.harness/lessons/ (pending/skills/notes/archive), publish skills via the DSH runtime copy and notes into AGENTS.md blocks. — lessons/types.ts:1-12, lessons/store.ts:1-12, lessons/publish.ts:1-12, daemons/LEARNING.md. Not referenced from cli/src any more (grep for lessons in cli/src/**/*.ts returns nothing).

Record schema (data model)

  • Scope: {profileId, projectId?, taskId?, branchId?}; task/branch require a project. — types.ts:12-14
  • Source event: {id, profileId, projectId|null, engine, sessionId, nativeEventId, taskId?, branchId?, role: user|assistant|tool|reference|derived, eligibility: coding|private|excluded|non_coding, observedAt, rootIds[1..32], derivedFrom?[{memoryId,revision}], text<=32,000, verification?, retention?: 'evidence_only'}. Derived sources must carry memory lineage. — types.ts:23-33
  • Evidence: {sourceEventId, quote<=4,000, paths: JSON pointers into the memory (1..32), verification?}. — types.ts:35-39
  • Verification: method ∈ {test, benchmark, static_analysis, proof_review, visual_review, manual_check, operational_observation}, result, artifact, revision, environment, coverage, limitations, deployment window. — types.ts:16-21
  • Draft/record: kind ∈ {working_preference, project_decision, verified_pitfall, reference, working_continuity}, facet, assertionType ∈ {stated_preference, observed_usage, project_constraint, accepted_decision, verified_finding, learning_goal, temporary_state}, claim, rationale|null, futureAction, applicability (typed condition map, ≤24 keys), exceptions[], retrievalCues[], optional details (style/decision/reference/experiment with runs, objective, evaluator, dataset, budget), evidenceClass ∈ {user_stated, observed_verified, inferred, imported}, evidence[1..16], conflictKey, validity {validFrom, validUntil, recheckWhen}; ≤32,000 bytes. — types.ts:59-73
  • Stored record adds schemaVersion: 1, id (random UUID), revision, state ∈ {active, tentative, needs_verification, superseded, archived}, createdAt, updatedAt. — types.ts:79-82, store.ts:454
  • Access is "Constructed by the authenticated host, never copied from a model's request body": {profileId, projectIds[], includeProfile, taskId?, branchId?}. — types.ts:92-99
  • Topics (notebook pages): statements each citing {memoryId, revision, paths}. — types.ts:101-113
  • SQLite tables: memory_meta, projects, memory_project_names, memory_project_policy, memory_session_policy, project_locators, sources, source_lifecycle, retired_sources, memories, revisions, memory_scope_changes, evidence, memory_support, memory_fts (FTS5: claim, rationale, cues), topics, topic_dependencies, source_dependencies, suppressed_sources, tombstones plus queue tables (memory_streams, memory_jobs, memory_job_context, memory_job_sources, memory_inference_calls, memory_inference_jobs, memory_queue_totals, memory_inference_purpose), receipt tables (memory_receipts, memory_receipt_items, memory_receipt_context, memory_receipt_relevance, memory_recall_feedback), notebook tables (memory_notebook_jobs, memory_notebook_waits). — store.ts:93-176, queue.ts:9-43, receipts.ts:52-80, notebook.ts:10-23
  • Store file: <directory>/memory.sqlite, directory 0700, file 0600, symlinks refused, PRAGMA journal_mode=DELETE; synchronous=FULL; secure_delete=ON ("No long-lived WAL containing deleted text"), FTS secure-delete on. Schema version 2 (records remain v1). Store is bound to one profile: opening with another profile id fails profile_mismatch. — store.ts:35-38,71-92,182
  • Default controls on creation: {learn:false, recall:false, generation:0, captureEpoch:0, learnSince:null}; preferences {learn:true, recall:true}. — store.ts:179-181
  • Tombstones: forget() deletes the memory, its dependent records/topics, FTS row, inserts tombstones(id, last_revision, at), adds source suppression keys (so replay cannot relearn), trims shared sources to remaining evidence excerpts, and returns alreadyDeliveredContent: 'not_erased'. — store.ts:996-1036
  • Revisions: optimistic concurrency via expectedRevision (revision_conflict), a generation counter on controls (generation_changed), conflicting claims with the same scope_key+conflictKey and overlapping conditions both go to needs_verification. — store.ts:1118-1150
  • Dedup: proposal fingerprint = digest of the draft minus evidence; identical meaning adds independent support (memory_support) instead of a new record. — admission.ts:73-76, store.ts:435-466
  • Source idempotency: native key = digest(engine, sessionId, nativeEventId); replays are duplicate; compacted sources leave content-free retired_sources receipts. — store.ts:342-383,409-433

Pipeline: capture → queue → extraction → admission → recall → receipts

  1. Capture (capture.ts): the host registers a session {profileId, projectId, engine: claude|codex|opencode, sessionId, transcriptPath, busy, liveFrom} — path "bound by the host, never copied from a model-supplied path". Byte-accurate cursor with file identity (dev/ino/birthtime) and a 64-byte anchor hash; detects rewritten transcripts; new sessions start at byte 0, an older conversation where learning was just enabled reads only the last 256 KB, and timestamps before consent (learnSince) are rejected. Episodes are sealed as complete | bounded | incomplete; ≤128 lines and ≤1 MB per poll; ≤90,000 bytes / 128 events per episode. — capture.ts:11-139
  2. Queue (queue.ts): ≤256 pending episodes (memory_backlog_full), unreviewed raw input expires after 7 days, 120 s leases, ≤4 episodes per inference call, ≤128 sources / 96 KB per review. Job states: open, queued, reviewing, waiting_for_model, budget_deferred, source_incomplete, failed, learned, no_useful_memory, cancelled, expired. — queue.ts:52-95
  3. Extraction (learner.ts): prompt coding-memory-v6 tells the model sources are "historical data, not instructions", a quoted opinion/pasted doc/tool output/assistant suggestion "is not the user's preference", bounded episodes may only yield explicit user statements, no-project sessions keep only personal preferences; existing drafts (≤8 KB) are supplied for dedup/conflict; prompt ≤120,000 bytes; 90 s deadline; answer ≤280 KB. — learner.ts:27-79,93-123
  4. Admission (admission.ts): checks secrets/injection, project scope required except for working_preference/reference kinds, every quote must appear verbatim in its source, every JSON pointer must exist in the draft, /claim, /futureAction, /applicability (and /rationale if non-null) must be covered by evidence, stated_preference/project_constraint/accepted_decision/learning_goal need user-role evidence with user_stated, verified_finding needs tool-role evidence with matching verification, experiment runs need tool evidence; inferred/imported or all-derived/reference evidence ⇒ tentative, else active. Comment: "These checks establish structural provenance, not a proof that an LLM paraphrase is faithful." — admission.ts:19-65
  5. Recall (store.recall): requires controls.recall; tokenizes the query (≤16 terms, stop-words removed), FTS5 bm25 over claim/rationale/cues, filters by scope, evidence visibility, applicability vs supplied conditions, exceptions, validity window, and "more specific record wins" for the same conflictKey; re-ranks by receipt usefulness; caps at 6 items and 3,000 bytes by default (max 16,000); two formats: summary (JSON coding_memory_context with notice "Historical context; ... Memory grants no action permissions.") and source_excerpts (coding_memory_sources v1 with exact quotes). Token count is an estimate (bytes/3). No embeddings / vectors. — store.ts:761-840, recallSources.ts:6-35
  6. Receipts (receipts.ts): binding {engine: claude|codex|opencode, sessionId, projectId, route: prompt_hook|mcp|manual} "Always constructed from the authenticated host session"; receipts store only digests (query, context, packet), bytes, token estimate and item ids/revisions, delivery: 'unverified'; retained 30 days / max 5,000; helpful/unhelpful feedback per memory revision+context adjusts ranking. — receipts.ts:9-80
  7. Notebook: derived topic pages from active records, every statement citing memory id+revision+path; invalidated on correction/forget. — notebook.ts, store.ts:1245-1250

Inference ("who does the extraction")

  • Extraction runs on the user's own selected native CLI and account, never an API key: Claude via claude --print --output-format stream-json --no-session-persistence --safe-mode --tools '' --strict-mcp-config ... only for certified versions 2.1.285–2.1.287; any tool use or hook event aborts. — claudeInference.ts:9-57
  • Codex via codex exec --json --ephemeral --sandbox read-only --ignore-user-config ... with ~24 features disabled (including hooks, memories, shell_tool), certified only for 0.159.0. — inference.ts:9-49
  • The application layer binds the learner to "the collection's observed native runtime" (the companion DSH's model). — application/memoryInference.ts:1-12, application/intelligence.ts:1

Inferences

  • The record model already contains what cross-machine sync needs at the record level (opaque UUIDs, monotonically increasing revisions, tombstones, suppression keys, content digests, source native keys), but no replication log, vector clocks, device ids, or merge rules exist; profileId is a single local owner and the DB refuses a second profile.
  • Project identity is local-path based (git common dir realpath), stored in project_locators separate from the opaque project UUID; this is deliberately portable in shape but a second machine would need a mapping step (e.g., remote URL hint + user confirmation), which the plan explicitly says must not be automatic proof of identity.
  • Recall is purely lexical (FTS5/bm25) plus typed condition matching; any semantic retrieval would be new work.

Gaps

  • I did not read every spec file; test counts per module are not enumerated here.
  • runtime.ts lines 383–472 (the update loop wiring of capture and learner ticks) were only skimmed.

2. Status: what is built, verified, and not; how it was (and is not) delivered into Claude Code and Codex

Takeaway

Implemented and unit-tested as a library; never released. Before #684 it was wired into the daemon (Settings → Experimental → Coding memory, default off) and delivered recall via Harness's own UserPromptSubmit hook (hookSpecificOutput.additionalContext) for Claude Code and Codex and via an OpenCode plugin. Today core has none of that: the hook text is gone, pair/memory requests answer UNSUPPORTED, and real-model extraction quality was never measured on the selected model (quota-blocked: zero completed extractions).

Cited Findings

  • Plan status (2026-10-01): "experimental implementation available for review ... quality validation remains incomplete. The memory core, native transcript reader, durable learning loop, restricted inference adapters, worker isolation and owner library have executable tests ... real extraction quality, full native lifecycles and production integration remain unverified." — docs/plans/2026-09-30-tim-memory.md:8
  • Native delivery evidence then: Claude Code UserPromptSubmit recall "certified for 2.1.286 and 2.1.287" (synthetic print-mode probes observed context after resume, manual compaction, model change); Codex UserPromptSubmit recall tested on 0.159.0 and trusted interactive 0.159.3; "Automatic mid-turn compaction and profile changes remain unverified; extraction is still certified only for 0.159.0." Other engines: "Search/manual recall only until automatic delivery is demonstrated." — docs/plans/2026-09-30-tim-memory.md:289-292. Git history also shows "Enable verified Codex 0.160 prompt memory recall (#654)" and "Deliver shared coding memory through native OpenCode prompts (#579)". — git log (commits d0762c19f4, 922c9dc9c6)
  • The removed delivery mechanism (diff of #684 on cli/hook/notify.mjs): on UserPromptSubmit for claude/codex, the hook POSTed /api/hook/session-start; the daemon's response could carry additionalContext (≤8,000 chars) and memoryReceiptId; the hook printed {"hookSpecificOutput":{"hookEventName":"UserPromptSubmit","additionalContext":...}} and then POSTed /api/hook/memory-emitted with the receipt id ("This proves only the pipe write. It does not prove native ingestion, model use or usefulness."). — git show 5f421456ef -- cli/hook/notify.mjs
  • Core now enforces its absence: a test asserts cli/hook/notify.mjs does not match memory-emitted|memoryReceiptId|additionalContext|acknowledgeMemoryOutput, and the core bundle contains no companions/, src/pair/ or src/memory/ input. — cli/src/coreIsolation.spec.ts:6-24. grep additionalContext cli/src cli/hook (non-spec) returns nothing at this revision.
  • Core refuses retired optional requests (pair verbs memory, recall_memory, status, list_harnesses) with UNSUPPORTED "without starting any feature service". — cli/src/backendSocket.optionalFeatures.spec.ts:8-25
  • PR #684 "Isolate unreleased companion and memory subsystems from core" (2026-10-03): 283 files, removed ~935 lines from cli.ts, memory-specific code from hookServer.ts, authSession.ts, localWsServer.ts, backendSocket.ts, dsh/runtime.ts; moved cli/src/memory → companions/src/memory. — git show --stat 5f421456ef
  • Isolation plan: "The product owner confirms that companion memory has not been released"; the runnable state is "the ordinary CLI plus independently built optional libraries ... The experimental viewer, automatic learning, old companion CLI/MCP commands and dial companion synchronization remain unavailable through this core build." — docs/plans/2026-10-03-memory-companion-isolation.md:24-26,167-174
  • Remaining integration listed by the package: startup/shutdown outside core with opt-in; verified user/project/session/model inputs "through supported client APIs, including revocation"; "Native recall delivery owned by the add-on, without changing core hook output or accepting unverified caller identities"; desktop/CLI/MCP/device clients; "A real sourced-memory check across conversations". — companions/README.md:52-66
  • Open gaps in that plan include: which client surface can provide scoped transcript access and revoke it; how a native adapter verifies the calling session and uses its selected model "without changing core authentication or copying credentials". — docs/plans/2026-10-03-memory-companion-isolation.md:120-138
  • Feature flag / setting: Settings → Experimental → Coding memory, "defaults off per account on this computer". — docs/plans/2026-09-30-tim-memory.md:20-25. The desktop UI still contains the setting and the Memories viewer (about 3,076 lines of desktop/lib/companions/coding_memory_*.dart), and its connection still sends {'verb': 'memory'} which core now refuses. The setting subtitle reads: "Account experiments sync across your devices; coding memory is local to this computer." — desktop/lib/settings/sections/experimental_section.dart:51,175, desktop/lib/companions/coding_memory_connection.dart:73
  • Personal-memory MVP (scoped 2026-10-03, two-hour box): "bounded review handoff prepared; live acceptance remains open". Criteria: learn 3–5 real memories with quotes, one new interaction through capture→extraction→storage, fresh session uses it, correction/forget, reviewable handoff. "These checks do not establish new automatic learning in the installed application." Last check of installed daemon reported waiting_for_model and memory_backlog_full. Deferred: "multi-machine synchronization". — docs/plans/2026-10-03-personal-memory-mvp.md:1-99
  • CI: companions/ is a PR CI component with its own check. — docs/validation-and-release.md:37. The bundle test "makes no model calls" and checks disabled-state inactivity, synthetic persistence, recall scope and worker failure handling. — companions/README.md:40-44
  • Scripts under companions/scripts/memory-* "document the previous integration. Several still expect its retired core endpoints or CLI commands." — companions/README.md:46-50

Inferences

  • "Implemented + tested": store, admission, capture, queue, learner, receipts, notebook, library, worker isolation (unit/spec level, synthetic data).
  • "Implemented, unverified": native extraction quality on the user's selected model; automatic learning in an installed app; full native lifecycle (mid-turn compaction, profile changes); OpenCode paths beyond version 1.18.34.
  • "Removed / disconnected": all daemon wiring, hook delivery (additionalContext), desktop connection, CLI/MCP memory verbs.
  • A new memory system can reuse the proven delivery idea (UserPromptSubmit additionalContext with a content-free receipt) but must now do so from outside core (an add-on hook or a service-owned adapter), per the isolation rules.

Gaps

  • I did not find a record of how many spec tests pass today (the companions CI check exists but I did not run it; read-only task).
  • The exact Codex hook trust/installation code for the removed memory path was not re-read; see section 5 for current hook installation.

3. Prior research and plans: key findings, measured results, blockers, decisions

Takeaway

The research chose a small Harness-owned core (SQLite, evidence-bound records, receipts) over adopting claude-mem/Hindsight/Mem0, scoped the first release to one machine, Claude Code + Codex, and coding only. Synthetic local-model diagnostics show partial success (e.g., v6 prompt 7/8 cases completed; v5 2/3 positive cases recalled), every reviewer/prompt variant beyond v6 was rejected, and the real selected-model evaluation is blocked by provider quota with zero completed extractions. Cross-machine sync is explicitly out of scope; opaque IDs and tombstones are "prepared" for it.

Cited Findings

Decisions

  • "General DSH domains, cross-machine transport, merge resolution, and account synchronization are outside this release." — docs/plans/2026-09-30-tim-memory.md:29
  • "No absolute path, engine session ID, avatar ID, or remote credential is the canonical memory identity. Keep local locators in a separate mapping. Stable opaque IDs, revision relationships, and tombstones prepare for later synchronization without implementing distributed ordering or last-writer-wins now." — docs/plans/2026-09-30-tim-memory.md:265
  • Worktrees resolve through the common Git directory; "A remote URL is a discovery hint, not proof of identity or authority. Forks and unrelated repositories with the same directory name remain distinct." — docs/plans/2026-09-30-tim-memory.md:263
  • "Cross-machine synchronization remains outside these slices." / "Add no automatic machine sync or bulk 24-hour scan during migration." — docs/plans/2026-09-30-tim-memory.md:435,443
  • Product doc: "General DSH domains and cross-machine synchronization are outside this product scope." — docs/plans/2026-09-30-coding-memory-product.md:3
  • Build vs adopt: "Recommend a small Harness-owned core first: project identity, evidence, selective consolidation, retrieval, and delivery receipts ... SQLite fits ... Keep records exportable as JSON and readable Markdown; do not make a vendor's prompts or native memory directory the source of truth." Compare against Claude-mem and Hindsight on held-out tasks before expanding; "Do not begin with a graph database, automatic skill generation, or machine synchronization." — docs/research/2026-09-30-cross-framework-memory.md:83-89
  • Delivery contract: "a memory service with CLI and MCP surfaces, plus engine-specific lifecycle adapters. Native memory continues to work. Harness does not rewrite Codex's generated memory files or silently disable either agent's native memory." Proposed ops: recall, search, read, propose, feedback, correct, forget, status. "Scope and identity are bound by Harness to the authenticated local session; tool arguments can narrow access but cannot widen it." — docs/plans/2026-09-30-tim-memory.md:269-287
  • Latency target: p95 < 100 ms on a warm 10,000-record store with a 200 ms caller deadline; "Do not synchronously invoke an LLM, download an embedding model, or traverse the entire transcript archive from a prompt hook." — docs/plans/2026-09-30-tim-memory.md:298
  • Feedback taxonomy: separate selected, delivered, read, agent_reported_applied, outcome_observed, user_confirmed; "A hook successfully printing JSON proves only that it emitted a packet". — docs/plans/2026-09-30-tim-memory.md:154
  • Suggested module boundary originally cli/src/memory/; superseded by #684 moving it to companions/. — docs/plans/2026-09-30-tim-memory.md:439

Landscape findings (from the 2026-09-30 research)

  • Claude Code: auto memory on by default, Markdown under a repo-specific directory shared by worktrees, index loaded at start bounded to 200 lines / 25 KB; native memory local to the machine. Codex: local memory optional, off by default, extraction then consolidation pipeline with job claims. Both expose SessionStart/UserPromptSubmit context injection; Codex requires trust review of non-managed hooks; "Transcript formats are not a stable API." "MCP supplies a common tool interface; it does not by itself ensure an agent recalls anything." — docs/research/2026-09-30-cross-framework-memory.md:11-41
  • Alternatives table (stars at 2026-09-30): Claude-mem 94,987; Hindsight 43,506; Mem0 66,364; Graphiti 31,323; Letta 24,982; Beads 27,535; Serena 29,914; MCP reference memory server. Claude-mem "Closest product alternative"; Hindsight "Strong backend alternative". — docs/research/2026-09-30-cross-framework-memory.md:45-56
  • Critique of the earlier lessons pipeline: project identity hashed the absolute working directory so worktrees fragmented; "Exposure and activity are mistaken for usefulness"; no task-specific recall contract. — docs/research/2026-09-30-cross-framework-memory.md:70-81
  • Modern-practitioner study adds: workspace guidance map, task contracts, working examples, experiment history (with failure status before score), maintained coding notebook as a derived view with revision citations. "Do not turn live branch ownership into historical memory." — docs/research/2026-09-30-modern-coding-memory.md

Measured results

Blockers

Inferences

  • Extraction is the weakest, most expensive link (≈55 s per local call, 6 calls/hour cap, quota exposure on subscription accounts, subtle interpretation errors survive review). A cross-machine design should not multiply extraction per machine; extracting once and syncing records is cheaper than syncing raw transcripts and re-extracting.
  • Every evaluation so far is synthetic or agent-judged; there is no held-out human-rated result and no task-benefit measurement.

Gaps

  • The 1,134-line review log (docs/plans/2026-09-30-coding-memory-review-log.md) was only skimmed by headings (rounds 1–18+); its detailed per-round results are not reproduced here.
  • docs/plans/2026-09-30-coding-memory-council.md was not read.

4. harnessd: small core, services in their own processes, and where memory would live

Takeaway

harnessd is master (supervisor) + core (sessions only) + service processes that reach the core only through core/api.ts with a service role; experiments run in on-demand processes. The design names "companion" and "memory" as their own services, "off until used", placed in the experimental host; nothing starts them today.

Cited Findings

  • Rule set: "No feature runs in the process that owns sessions"; "Work follows activity, never history" (no hot path reads proportional to conversation length); "Nothing waits on a service"; "One contract, narrow authority. Services use the same authorized local API clients use, with a scoped role. No unrestricted extension RPC"; "No flag day ... Protocol changes are additive." — docs/design/2026-10-03-harnessd.md:42-59
  • Process diagram lists services: relay (backend link, sign-in, E2EE pairing, trust group, P2P, sharing, view other machines, machine list; self-hostable), devices, models, search ("session index across all engines"), viewers, teams, workspaces, "companion / memory — a package since #684; nothing starts them today", light host. — docs/design/2026-10-03-harnessd.md:61-112
  • "Companion and Memory: Both are a package since #684, and nothing starts them today. In harnessd they are two services that are off until used, and Memory never depends on Companion." — docs/design/2026-10-03-harnessd.md:342-345
  • Local API for services: a role: "service" in machine_select with a per-boot token from the master granting only manifest capabilities; request ownership (core routes declared request types; SERVICE_UNAVAILABLE with retryable: true when down; owner-only/sealed-only/local-only checks run in core before routing); "Scoped reads ... transcript_read returns at most a window of one agent's transcript from an offset, and only to a service whose manifest grants it." Events via subscription with bounded queues and resync. — docs/design/2026-10-03-harnessd.md:347-372
  • Target process table: core (always), relay/gateway, devices (on demand), models, search (node:sqlite), viewers, edge host (light pure-JS), and "experimental host: Teams and Tab collaboration, the orchestrator, Share, and Companions and Coding memory when they return — Experimental code never shares a process with stable code — on demand". ~50 MiB per process. — docs/design/2026-10-06-core-boundary-next.md:432-461
  • Status 2026-10-07: core-boundary steps 1–11 landed; core import closure 114,622 → 71,244 lines; line counts now informational only. — docs/design/2026-10-06-core-boundary-next.md:3-11
  • How to add a service: start<Name>(core: CoreApi, ports) in src/services/<name>.ts; declare <NAME>_REQUESTS; "Trust asker, never the payload: if (!asker.owner) return { error: 'OWNER_REQUIRED' }"; off ⇒ SERVICE_UNAVAILABLE; host switches a service off after five failures a minute; 100% coverage with fakeCore(); fault injection via HARNESSD_TEST_FAULTS. — cli/src/services/AGENTS.md:6-46
  • Current process hosts (SERVICE_HOSTS): engine-claude, engine-codex (on demand), search (always), viewers (always), edge (workspaces, usage, monitor, projects, handoff, recaps, windowNames, shell; always), gateway (on demand), models, devices, and experiments orchestrator, teams, sharing, commandBar (on demand). "node:sqlite binding [kept] out of the edge host"; lib/sqliteRead.ts loads the binding lazily. — cli/src/services/AGENTS.md:48-100, cli/AGENTS.md
  • Where new code goes: new feature → new service; engine support → src/engines/<engine>/; never backendSocket.ts switch cases; src/architecture.spec.ts walks imports from core/main.ts. — cli/AGENTS.md
  • The core owns "Engine hooks (/api/hook/*) and hook installation". — docs/design/2026-10-03-harnessd.md:135-150
  • Owner direction (verbatim in the doc): "the goal is to build a stable, safe, reliable daemon core. everything else lives outside of the daemon as subsystems/services. stable at core. extendible at the edges via subsystems." — docs/design/2026-10-06-core-boundary-next.md:44-47
  • Daemon core completion checklist (2026-10-09) tracks remaining separation; "No release is authorized." — docs/research/2026-10-09-daemon-core-completion.md:1-12

Inferences

  • A memory service fits as an experimental-host (or its own on-demand process, since it uses node:sqlite and model subprocesses — the same risk class that put search in its own process) service that: subscribes to turn events, reads bounded transcript windows through transcript_read (instead of opening native files by path as capture.ts does today), answers owner-checked requests from the apps, and is SERVICE_UNAVAILABLE when off.

  • Prompt-time recall is the hard part under these rules: hooks are owned by core, and core may not call a service synchronously in line without a port and fallback. A recall port with a strict deadline and an empty fallback would match the "nothing waits on a service" rule.

  • What exists today for service access (verified in code): services connect with role: 'service' and a token. — cli/src/localWsServer.ts:404, cli/src/services/process.ts:307. CoreApi gives a service dataDir ("a service keeps its own files in it"), machine.id()/computerId()/name(), conversations, and agents.all()/live() returning registered sessions. — cli/src/core/api.ts:120-140. The search service builds its sources from those sessions' transcriptPath (or core.transcripts.databaseHistory for database engines) and reads the files itself. — cli/src/services/search.ts:82-101. The recaps service receives {kind:'events', session, events, replay} turn events through a port. — cli/src/core/api.ts:627

  • The designed transcript_read scoped-read request does not appear anywhere in cli/src (grep), so "scoped reads" are planned only; today's pattern is "core hands the service a path, the service reads".

Gaps

  • No service manifest/capability enforcement for transcript access was found beyond the service role and token; I did not audit what a service token is allowed to call.

5. Engines, hooks into engines, and session search

Takeaway

Fourteen process engines (plus the plain terminal) sit behind an internal Engine interface that is being migrated a few engines at a time; Claude Code and Codex are furthest along. Harness installs its own command hooks into each engine's native settings (Claude: ~/.claude/settings.json SessionStart/SessionEnd/UserPromptSubmit/Stop/StopFailure; Codex: $CODEX_HOME/hooks.json SessionStart/UserPromptSubmit, and it now pre-records its own hooks as reviewed in Codex's config.toml). The hook script only registers sessions and turn boundaries with the daemon over authenticated loopback; it injects no context today. Session search is a per-machine SQLite FTS5 index of every turn (ask, answer, tool names) across Harness-run sessions and conversations started outside Harness for 12 engine providers.

Cited Findings

Engine interface

  • Engines: claude, codex, cursor, opencode, pi, hermes, commandcode, devin, muse, amp, kilo, grok, agy, copilot, plus terminal (a plain shell, not a process engine). — cli/src/engines/types.ts:11-15
  • Engine = {name, transcript, launch, hooks (declared data core applies in line, never in the engine's worker), live, runtime, screen, modelControl, questionControl, submission, nativeControl? (Codex only)}. — cli/src/engines/engine.ts:13-28
  • Design: "One Engine per engine, made of a manifest and eight optional facets: launch, transcript, sessions, screen, input, hooks, models, one-shot. 132 members in all"; status 2026-10-07: Claude Code and Codex readers, live parsing, runtime profiles, screen, model control, question navigation and Codex's app-server connection run in supervised engine workers; "Still in core for them: hook admission and installers, and engine-specific launch, discovery and resume." — docs/design/2026-10-05-engine-interface.md:1-40
  • "This is an internal interface, not an external plugin API." The other twelve engines' code leaves the core's static imports and loads through inProcess.ts only when one of their sessions appears; what core needs earlier is declared data in <name>/contract.ts. — cli/src/engines/README.md
  • Engine worker processes engine-claude, engine-codex start on demand. — cli/src/services/AGENTS.md
  • Harness watches transcripts the agent already writes; "Harness does not wrap your agent. Your agent keeps running as the user's own process, in their own tmux pane, with their own credentials." — cli/src/engines/README.md. Transcripts are JSONL for most engines, SQLite for OpenCode, Kilo, Hermes and Devin. — docs/architecture.md:130-140

Hooks

  • Claude Code: home ~/.claude, file settings.json, events SessionStart, SessionEnd, UserPromptSubmit, Stop, StopFailure, 5 s timeout, in-place write; UserPromptSubmit is the "catch hook" that re-registers a session. — cli/src/engines/claude/hookContract.ts:7-33
  • Codex: home CODEX_HOME, file hooks.json, events SessionStart (matcher startup|resume|clear|compact) and UserPromptSubmit; malformed file left untouched; atomic write. Codex 0.162 asks the person to review unseen hooks; "Picked 'Continue without trusting', Harness's hooks never run"; so Harness records its own two hooks' trusted hash in config.toml table hooks.state (trusted_hash), matched against codex app-server hooks/list of codex-cli 0.162.0; "Any other hook is still asked about." — cli/src/engines/codex/hookContract.ts:7-45 (commit 6b5332adaf, #1127)
  • Hook settings are declared data applied by one kit installer at daemon start and before a spawn; core authors the command every block runs (kit/notifyHooks.ts → cli/hook/notify.mjs). — cli/src/engines/facets/hooks.ts:30-60, cli/src/engines/kit/notifyHooks.ts:1-20
  • Hook transport: notify.mjs POSTs to the daemon's loopback HTTP server; routes /api/hook/session-start (SessionStart and UserPromptSubmit), session-end, tool-start, turn-start, turn-stop; requests are checked against a per-install hook credential (43-char random token file hook-credential). — cli/src/hookServer.ts:1-30,470-500, cli/src/lib/hookAuth.ts:1-12
  • All thirteen native installers are eager in core because "Hook installation supplies session discovery and turn boundaries"; golden test of 340 cases. — docs/research/2026-10-09-native-hook-installation.md:1-10
  • The harnessd design places "Engine hooks (/api/hook/*) and hook installation" in core. — docs/design/2026-10-03-harnessd.md:135-150
  • No context injection today: the core test forbids additionalContext in notify.mjs. — cli/src/coreIsolation.spec.ts:21-24
  • Another existing delivery channel into engines: the DSH runtime writes session-scoped instructions/env/argv snapshots under <workspace>/.harness/runtime/<sha256(key)> and a bootstrap context every engine reads; "No native skill directories or shared mutable engine config." — cli/src/dsh/runtime.ts:1-30. The old lessons system published approved skills as read-only copies into each runtime plus an index line in its CONTEXT.md. — companions/src/memory/lessons/publish.ts:1-12
  • MCP: the companion package has a stdio MCP server named harnessd exposing the companion control tools over the loopback pair request (now refused by core). — companions/src/companion/mcp.ts:1-20

Session search

Inferences

  • The hook pipe that a prompt-time recall would need already fires on every Claude Code and Codex prompt (UserPromptSubmit) and reaches core with an authenticated session binding; what is missing is (a) a response field carrying context, which core currently forbids, and (b) a way for core to ask a memory service with a short deadline and empty fallback.
  • Session search is already a cross-engine, per-machine full-text archive of every turn; it is an obvious candidate source for recall or for "evidence" lookups, but it is per machine and contains raw text, so it is not itself a sync-safe artifact.
  • Codex hook trust is fragile (hash-based review); any new hook (e.g., a memory hook) would hit the same review prompt unless recorded the same way.

Gaps

  • I did not check which of the other 12 engines support a prompt-time context-injection hook (only Claude Code, Codex and OpenCode were used by the old memory work).
  • docs/design/2026-10-08-engine-remaining-facets.md and 2026-10-09-external-session-boundary.md were not read.

6. Cross-machine today: accounts, machines, relay, E2EE, and what syncs

Takeaway

Every daemon holds one WebSocket to the account backend (the "relay"), and all client/machine content travels end-to-end encrypted (Ed25519 identities, CPace pairing, X25519 sessions, ChaCha20-Poly1305) so the relay forwards ciphertext. Machines of one account trust each other through an append-only, hash-chained device key log stored on the backend plus a gossiped trust group. The backend stores account metadata in plaintext (machines, agent names, a per-account "Desk" of tabs, experimental opt-ins, share/link metadata, explicitly published Hub snapshots), and already has a revisioned, idempotent-ops sync pattern (Desk, Zoo) with push notifications to every adapter socket. There is no sync of private project content, transcripts or memory; product docs require "an explicit storage and encryption design before adding cloud synchronization".

Cited Findings

Backend

  • Node/Fastify, MongoDB via Prisma, Redis pub/sub; WebSocket paths /api/adapter-ws (daemons), /api/web-ws, /api/observer-ws (private sharing), /api/device-ws, /api/manager-ws; signals WebRTC and hands out STUN/TURN; hosted at harness-api.autonomous.ai. — docs/architecture.md:160-176, backend/prisma/schema.prisma:1-4, backend/src/lib/bus.ts:1-18
  • "Backend and relay: Identity, discovery, selected shared metadata, signaling, and encrypted forwarding." "The relay stores machine records, agent names and daily counters, never a transcript, a recap or a keystroke." — docs/architecture.md:108,143-144
  • Machine row: owner userId, machineId = sha256(apiKey)[:32], name, hostname, computerId (the CLI's per-computer id), client version, billing fields, soft delete. — backend/prisma/schema.prisma:151-227
  • Desk: "its tabs, in order, and the agents each holds — one document per user, the same on every computer ... Written through POST /api/desk/ops ... small idempotent operations applied in order under revision, so two windows racing merge by rule rather than by whoever saved last. Plaintext". — backend/prisma/schema.prisma:736-751. Route: a write that lost a race is retried from the fresh document ("replaying them is the merge"); afterwards "every adapter socket of the user hears desk_changed ... and re-fetches". — backend/src/routes/desk.ts:1-40
  • Zoo uses the same revisioned ops pattern ("one document per user, the same on every client"). — backend/prisma/schema.prisma:795-809
  • ExperimentalSettings: account opt-ins (focusBarCreature, shareButton, devicesTab, revision). Desktop copy: "Account experiments sync across your devices; coding memory is local to this computer." — backend/prisma/schema.prisma:777-793, desktop/lib/settings/sections/experimental_section.dart:51
  • HarnessShare / HarnessLink: metadata only; "The owner daemon keeps the final policy and encrypted discussion." — backend/prisma/schema.prisma:714-735,890-911
  • CommunityHarness (the Hub): "Explicitly published, portable single-session snapshots", including files and conversation JSON. — backend/prisma/schema.prisma:10-35. This is the one place found where the backend stores conversation content, and only on explicit publication.
  • ConnectorCredential stores third-party OAuth tokens per account ("this database is private"), so the backend already holds some account secrets server-side. — backend/prisma/schema.prisma:912-930
  • TabChannel: "Routing only; channel messages and member capabilities stay on the host daemon." — backend/prisma/schema.prisma:753-765

E2EE and trust

  • Scheme: Ed25519 identity; CPace-style PAKE (ristretto255) from a 6-char pairing code; X25519 per-connection; random 32-byte per-process group key for 1→many up events; ChaCha20-Poly1305 per frame with AAD binding type/session. The core file must be byte-identical between CLI and browser (drift-guard test). — cli/src/lib/e2ee/core.ts:1-17. "The relay never sees plaintext user content: only ciphertext envelopes + public PAKE messages." — cli/src/lib/e2ee/manager.ts:1-17
  • Device key log: "an account's append-only, hash-chained list of the identity keys its devices (machines and viewer apps) hold ... signing in is all it takes for an account's machines to reach each other end to end, with no remote password. The backend stores and serves the log but cannot forge an entry"; a backend adding its own device is "made visible" through gossip of the log head over E2EE sessions. Ported to Dart (desktop and mobile) and copied into the backend, all held to shared vectors. — cli/src/lib/e2ee/deviceLog.ts:1-18, backend/prisma/schema.prisma:854-888
  • Trust group: devices that share an E2EE session exchange whole rosters; "compromising ANY member lets it add keys the whole group trusts. The backend still cannot"; removal propagates as a tombstone that beats older entries; stored at ${ADAPTER_DATA_DIR}/e2e/group.json (0600). — cli/src/lib/e2ee/trustGroup.ts:1-16. group_sync is one sealed RPC over the relay session that merges rosters and carries the device-log head. — cli/src/lib/e2ee/groupSyncer.ts:1-17
  • Machine-to-machine: harness remote-password set + harness link connect <machineId> (password-authenticated CPace) pins a peer in machinePeers.json; relayClient.ts runs the client role of the E2EE protocol from one daemon to another machine. — cli/src/lib/e2ee/machinePeers.ts:1-14, cli/src/lib/e2ee/relayClient.ts:1-12
  • Trust is kept per account; switching accounts stashes one account's trust stores. — cli/src/lib/e2ee/accountTrust.ts:1-18
  • Harness-specific sealed RPC extensions live in one registry (grid fleet RPCs, sharing SHARE_*, viewer forwarding, "the pair brain's machine-to-machine PAIR_*", PLATE_*); "A type listed in none of these travels plaintext". — cli/src/lib/e2ee/applicationFrames.ts:1-14
  • The gateway process holds the backend link, E2EE manager, keys, P2P channels; "The core never sees a key"; default-deny on frames that do not open under the connection's session; content-bearing replies that cannot be sealed become E2EE_REQUIRED. — cli/src/gateway/gateway.ts:1-14. The gateway is also "the single writer of machines.json" (the account's machine list). — cli/src/gateway/accountHttp.ts:1

Machines, fleet, clients

  • Fleet service: "the owner's other machines, and getting to them ... The machine list kept fresh, the keys pinned for the machines linked to this one, the device lane to them ... and the router every turn goes through". — cli/src/services/fleet.ts:1-14, cli/src/services/fleetRouter.ts:1-14. The lane's per-machine E2EE sessions are held by the gateway; with no session it "seals nothing: lost, never the frame as it came". — cli/src/gateway/lane.ts:1-12
  • harness remote opens a terminal on another of the account's machines through the daemon relay. — cli/src/remoteCommand.ts:1-14
  • Desktop reaches other machines through its local daemon's encrypted link; mobile and web terminate encryption themselves and reach machines through the relay; terminals can use WebRTC (STUN-only P2P canary) with relay fallback. — docs/architecture.md:83-95, backend/README.md
  • Sign-in: Harness-issued sign-ins for a phone (QR from a signed-in computer) or a computer (phone approves); "Phone sign-in ... cannot sign another device in". Backend stores only a hash of the refresh token. — CONTEXT.md, backend/prisma/schema.prisma:811-852
  • "Window layouts belong to clients; account-level swarm membership is shared through the backend. Runtime truth belongs to the daemon owning the work ... Cross-machine orchestration, project migration, and universal engine-session portability are separate capabilities; access to a remote terminal does not provide them automatically." — docs/architecture.md:111-128
  • Relay as a self-hostable service: "End-to-end encryption makes the server untrusted by design ... Features are capabilities the relay advertises. Forwarding, presence and pairing rendezvous are the minimum. Desk sync, the Store, tab channels, shares and the device key log are optional, and the apps hide what a relay does not offer." — docs/design/2026-10-03-harnessd.md:167-186
  • Product direction: "The backend carries identity, reachability, and agreed shared metadata; private project content requires an explicit storage and encryption design before adding cloud synchronization." — docs/product-direction.md:200-201
  • The older lessons store was described as "shared by every daemon you pair with" (a git-backed folder ~/.harness/lessons/). — companions/src/memory/lessons/store.ts:2-3. I found no code that actually replicates it between machines.

Inferences

  • Two reusable building blocks for cross-machine memory already exist: (1) a revisioned, idempotent op-log document per account with a push "changed" notification (Desk/Zoo), and (2) an E2EE device mesh with authenticated per-account membership and gossip (device key log + trust group + group_sync). Combining them suggests "ciphertext op-log on the backend, keys only on devices", but no such encrypted-at-rest store exists today; Desk is plaintext by design.
  • The per-process group key is for live fan-out, not for at-rest data; an at-rest memory store needs a separate account content key distributed over the device mesh (planned nowhere in the repo).
  • A machine that is offline cannot be queried live (fleet router targets live machines), so recall across machines needs replicated data, not remote queries.

Gaps

  • I did not find any doc or code for encrypted-at-rest account data or for a content key shared across devices.
  • Mobile and web memory views: none found beyond the desktop Flutter Memories viewer.

7. Product principles and constraints recorded in the repo

Takeaway

Stability-first small core; every feature a separable service that can fail alone and is free when off; experiments in an on-demand host; user-owned, inspectable, correctable memory with evidence; local-first with the backend holding only metadata unless an explicit encryption design exists; validation discipline and evidence honesty in every doc.

Cited Findings

  • harnessd rules: stability first, work follows activity not history, nothing waits on a service, one contract with narrow authority (no unrestricted extension RPC), port proven logic, no flag day. — docs/design/2026-10-03-harnessd.md:42-59
  • "A service is a feature the core can run without. It may fail; the core may not." — cli/src/services/AGENTS.md:1-3. "Experimental code never shares a process with stable code." — docs/design/2026-10-06-core-boundary-next.md:439
  • Disable behavior required of Memory: "Disabling Memory stops capture, inference, recall delivery and retries, revokes active work, and leaves its saved data available for explicit management ... There must be no memory-specific message mutation, background job, model call or probe when Memory is disabled." — docs/plans/2026-10-03-memory-companion-isolation.md:185-191
  • Memory ownership is "the user and project, never an avatar or companion terminal ID"; an unavailable model configuration "does not authorize a fallback account or provider". — docs/plans/2026-10-03-memory-companion-isolation.md:68-78
  • Product boundaries: "Decisions outlive conversations. Approved choices and their provenance remain available outside a model's current context. People can inspect, correct, and remove this memory." "Capabilities can be replaced. Work records and artifact contracts should survive a change of engine." — docs/product-direction.md:178-190. Roadmap stage 2 "Carry decisions across related work" and stage 1 includes "account-free local use". — docs/product-direction.md:302-312
  • Naming: "Harness is the software product. Autonomous is the company. Agents are the primary way to do work"; a Project is "The files and working context for the work, on a particular computer"; a harness in the workspace is "A running agent session"; keep vendor names intact (Claude Code, Codex, OpenCode, pi). — docs/naming-system.md:8-10,46-60
  • Process rules: measure through completion; never describe an incomplete suite as passing; PR CI runs only changed components (companions/ has its own check); merge via make merge-pr. — AGENTS.md, docs/validation-and-release.md:37
  • Every additional protocol surface requires "a separate, minimal contract review under CONTRIBUTING.md"; unresolved gaps "must not be filled by weakening caller verification or silently widening core responsibilities". — docs/plans/2026-10-03-memory-companion-isolation.md:135-138
  • Evidence honesty is a recurring constraint in memory docs: synthetic diagnostics, agent-judged reviews and hook emission are explicitly not counted as quality, delivery or benefit evidence. — e.g. docs/plans/2026-09-30-tim-memory.md:154, docs/research/2026-10-01-memory-quality-review-blocked.json

Inferences

  • A cross-agent, cross-machine memory that respects these rules would be: an on-demand experimental service (own process, node:sqlite), off = zero work, reading transcripts via core-supplied sessions, owner-only requests, delivering into engines only through a core-reviewed, deadline-bounded hook extension, and syncing only end-to-end encrypted data whose keys never reach the backend.

Gaps

  • CONTRIBUTING.md sections on contract review were only grepped, not read in full.