Summary
LIFEOS/TOOLS/MigrateApprove.ts (~line 89), in the memory/feedback branch:
return join(HOME, ".claude", "projects", "${HARNESS_USER_DIR}", "memory");
The ${...} sits inside an ordinary double-quoted TypeScript string — it is never interpolated, so the branch resolves to a directory literally named ${HARNESS_USER_DIR}. No real slug can ever match; every path this branch produces is wrong, silently. This is a wrong-path/silent-miswrite bug rather than dead code: the branch runs and returns a path that cannot correspond to any real session directory.
Suggested fix
SessionHarvester.ts in the same directory already implements the pattern this branch meant to use: it derives the project slug with CLAUDE_DIR.replace(/[\/\.]/g, "-") and builds join(CLAUDE_DIR, "projects", CWD_SLUG). (HARNESS_USER_DIR exists nowhere as a real symbol or env var — it's only a doc-comment placeholder for that slug.) The fix is to compute the slug the same way and interpolate it, rather than embedding the literal string — likely join(HOME, ".claude", "projects", <cwd-slug>, "memory").
Note: the unguarded join(LIFEOS_DIR, target) in the same function (accepts ../absolute segments) is a potential path-traversal if proposed_target is model-influenced. That one is being routed to the maintainer through GitHub private vulnerability reporting rather than this public issue, per upstream's SECURITY.md.
Summary
LIFEOS/TOOLS/MigrateApprove.ts(~line 89), in thememory/feedbackbranch:The
${...}sits inside an ordinary double-quoted TypeScript string — it is never interpolated, so the branch resolves to a directory literally named${HARNESS_USER_DIR}. No real slug can ever match; every path this branch produces is wrong, silently. This is a wrong-path/silent-miswrite bug rather than dead code: the branch runs and returns a path that cannot correspond to any real session directory.Suggested fix
SessionHarvester.tsin the same directory already implements the pattern this branch meant to use: it derives the project slug withCLAUDE_DIR.replace(/[\/\.]/g, "-")and buildsjoin(CLAUDE_DIR, "projects", CWD_SLUG). (HARNESS_USER_DIRexists nowhere as a real symbol or env var — it's only a doc-comment placeholder for that slug.) The fix is to compute the slug the same way and interpolate it, rather than embedding the literal string — likelyjoin(HOME, ".claude", "projects", <cwd-slug>, "memory").