Merge pull request #1644 from sargunv/fix/global-memory-path

Fix global memory for main agent: correct path and add writable mount
This commit is contained in:
gavrielc
2026-04-05 22:33:23 +03:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -258,7 +258,7 @@ Read `/workspace/project/data/registered_groups.json` and format it nicely.
## Global Memory
You can read and write to `/workspace/project/groups/global/CLAUDE.md` for facts that should apply to all groups. Only update global memory when explicitly asked to "remember this globally" or similar.
You can read and write to `/workspace/global/CLAUDE.md` for facts that should apply to all groups. Only update global memory when explicitly asked to "remember this globally" or similar.
---

View File

@@ -104,6 +104,16 @@ function buildVolumeMounts(
containerPath: '/workspace/group',
readonly: false,
});
// Global memory directory — writable for main so it can update shared context
const globalDir = path.join(GROUPS_DIR, 'global');
if (fs.existsSync(globalDir)) {
mounts.push({
hostPath: globalDir,
containerPath: '/workspace/global',
readonly: false,
});
}
} else {
// Other groups only get their own folder
mounts.push({