Skip to content

Spec-forest can lack AI features if it can't find claude. #11

Description

@nfurfaro

I was running into an issue yesterday where I just wasn't seeing any AI features in Spec-forest (i.e: buttons for "AI-answer", etc..).
it turned out that spec-forest couldn't find my claude installation.

After some investigation I learned:

The .dmg app launches as a macOS GUI process, which gets a minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin). It doesn't source your shell profile, so claude installed
via homebrew/npm/volta isn't found — hence No such file or directory (os error 2).

The fix in claude_runner.rs appends common CLI installation directories (/opt/homebrew/bin, /usr/local/bin, ~/.npm-global/bin, ~/.nvm/..., ~/.volta/bin) to the PATH
environment variable when spawning the claude subprocess. This way the app can find claude regardless of how it was launched.

I've now added this small fix locally, and am able to run the binary directly and have it connect to claude without issue.
I'm not sure why this happened though? I thought it wored the day before, same .dmg file. Has anyone else encountered this?
Maybe just related to the way claude was installed, which might be different from user to user.

There were some errors I noticed, I think they were generic 500 errors which helped diagnose, but could have been more specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions