Enabled Shared Harness Memory#45
Merged
Merged
Conversation
d282b9d to
b837f9c
Compare
6 tasks
39fd837 to
e1c3f2f
Compare
Creating a symlink on Windows requires Administrator or Developer Mode and otherwise raises OSError (WinError 1314), which would crash memory layout setup. _ensure_symlink now catches that and falls back to a one-time copy so the app still starts, logging a clear warning that this harness's memory will NOT be shared on such a platform (enable Developer Mode for sharing). POSIX behavior is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
torrmal
approved these changes
Jun 18, 2026
ea-rus
requested changes
Jun 19, 2026
| )(), | ||
| ) | ||
|
|
||
| context = HermesMemoryAdapter().build_prompt_context() |
There was a problem hiding this comment.
this line fails when I run it locally,
Looks like tests are not run on staging (should be enabled in CI)
Collaborator
Author
|
@ea-rus I have fixed the failing test. I will create a separate PR to ensure that the workflows (and tests) run when a PR is created. |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables shared memory across harnesses.
The core concept for enabling shared memory across harnesses is as follows:
Each harness will need to define its own memory adapter. For the most part, this only requires specifying the following:
RUNTIME_SYMLINKS: the direct mapping between the harness's memory files and the canonical slots. This is used to create the symlinks in the harness's memory directory.PROMPT_INJECT_SLOTS: the slots that will be injected into the system prompt. This is used to inject the read-only canonical content into the system prompt.The Symlinks will be created automatically based on the given definitions. The prompt, however, will need to be injected within each harness.
Project memory is also injected into the system prompt as part of the above.
As a result of the above changes, the execution flow of the API endpoints has changed as follows:
Previously, since each harness maintained it's own set of files for memory, UI reads and writes had to go through the harness. However, now that a shared set of canonical files are available, these operations are simpler and can act directly on the files.
The API contract has also been updated to a cleaner form that does not rely on any file or project paths. The corresponding UI updates have been made here: mindsdb/cowork#176.