@@ -184,13 +184,15 @@ def compute_project_id(repo_root: Path) -> str:
184184 memory tree (Addendum 2). Distinct repos still get distinct ids via the
185185 remote-hash and/or directory name.
186186
187- ``RALPH_PROJECT_ID`` override (Wave 5, Addendum 3, 2026-06-17): if the env
188- var is set, it wins. This gives codex/claude an explicit escape hatch and
189- keeps compatibility with codex's existing ``RALPH_PROJECT_ID`` convention.
190- When unset, the git-remote-hash derivation below is used so the SAME target
191- repo yields the SAME id from either agent.
187+ Tree-id override (Wave 5, Addendum 4, 2026-06-17): the DEDICATED env var
188+ ``RALPH_MEMORY_PROJECT_ID`` wins when set. We deliberately do NOT honor the
189+ legacy session var ``RALPH_PROJECT_ID`` here, because codex hooks set it to a
190+ per-session ``p-<hash>`` id that would split the shared tree. The shared
191+ memory tree is keyed by git-remote-hash so the SAME target repo yields the
192+ SAME id from either agent; ``RALPH_PROJECT_ID`` stays free for codex's own
193+ ledger/handoff subsystem.
192194 """
193- override = os .environ .get ("RALPH_PROJECT_ID " , "" ).strip ()
195+ override = os .environ .get ("RALPH_MEMORY_PROJECT_ID " , "" ).strip ()
194196 if override :
195197 return safe_segment (override , "project_id" )
196198 main_repo = resolve_main_repo_root (repo_root )
0 commit comments