Skip to content

Failed to load CLAUDE.md files for projects in paths with spaces/special characters (iCloud Drive) #444

@greasematic

Description

@greasematic

Bug Description

"CLAUDE.md Memories" section in the project view shows "Failed to load CLAUDE.md files" for projects located in paths containing spaces or special characters (e.g., iCloud Drive paths on macOS).

Steps to Reproduce

  1. Have a git repo with a valid CLAUDE.md at a path containing spaces or tildes, e.g.:
    ~/Library/Mobile Documents/com~apple~CloudDocs/MacbookBackup/mystuff/code/universal-software-factory
    
  2. Open opcode and navigate to Projects → select the project
  3. Observe the "CLAUDE.md Memories" section

Expected Behavior

CLAUDE.md content should load and display correctly regardless of the project path.

Actual Behavior

Shows red error text: "Failed to load CLAUDE.md files"

The CLAUDE.md file itself is valid — Claude Code CLI reads it without issues in the same project.

Screenshot

Screenshot showing the error

Image

(The error appears at the top of the project view, above the session list)

Environment

  • opcode version: latest (installed via Homebrew/dmg)
  • macOS: Darwin 25.3.0 (Sequoia)
  • Apple Silicon: Yes
  • Project path: ~/Library/Mobile Documents/com~apple~CloudDocs/... (iCloud Drive)

Notes

  • Sessions load fine — the 45 sessions in the project are all visible and browsable
  • The issue appears to be path escaping — the Mobile Documents (space) and com~apple~CloudDocs (tilde) in the iCloud Drive path likely aren't being quoted/escaped properly when reading the CLAUDE.md file
  • Projects in simpler paths (no spaces/special chars) may not have this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions