Skip to content

SEP-017: accept_outcome.sh MEMORY.md path logic is fragile #7

Description

@samudzi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    SEPSoftware Evolution ProposalbugSomething isn't workingdesign-gapSignificant design gaps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions