Summary
PWD_ESCAPED=$(pwd | sed 's|/|-|g')
for candidate in "${HOME}/.claude/projects/${PWD_ESCAPED}/memory"; do
A for loop over a single hardcoded string is not a loop — it's a single iteration with no fallback logic. If the project directory hash doesn't match (e.g., called from a subdirectory), MEMORY_DIR stays empty and the work log update is silently skipped. The second loop uses * glob which could match the wrong project if multiple projects have similar path hashes.
Motivation
This fragile path resolution means work log updates are silently dropped in common scenarios (running from subdirectories, different working directory contexts).
Proposed Change
Use the same resolve_memory_md helper from common.sh for consistency.
Acceptance Criteria
accept_outcome.sh uses the shared path resolution logic from common.sh
- Work log updates succeed regardless of the calling directory
- No silent failures when project directory hash doesn't match exactly
Summary
A
forloop over a single hardcoded string is not a loop — it's a single iteration with no fallback logic. If the project directory hash doesn't match (e.g., called from a subdirectory),MEMORY_DIRstays empty and the work log update is silently skipped. The second loop uses*glob which could match the wrong project if multiple projects have similar path hashes.Motivation
This fragile path resolution means work log updates are silently dropped in common scenarios (running from subdirectories, different working directory contexts).
Proposed Change
Use the same
resolve_memory_mdhelper fromcommon.shfor consistency.Acceptance Criteria
accept_outcome.shuses the shared path resolution logic fromcommon.sh