macOS app: in-app file viewer can't open files outside the session working directory, and folder grants don't persist across sessions
What happens
In the macOS desktop app, when Claude gives me a markdown link to a file on my own machine, the in-app viewer won't open it if that file sits outside the session's working directory. I get:
This file is outside the working directory. It can't be opened here, but it may still exist on disk.
Claude can fix it mid-session by calling request_directory on the folder, and that does work. But the grant only lasts for that session. Every new session starts with no access again, so the first link to a file outside the working folder is dead until an agent thinks to request the folder.
What I expected
A folder I've granted stays granted. Or the viewer isn't tied to the working directory at all, given Claude already has read access to the file it just wrote.
Why the obvious workarounds don't help
permissions.additionalDirectories in ~/.claude/settings.json is already set to my home folder. It makes no difference to the viewer, which seems to use a separate, session-only permission.
I can point every session at a parent folder so nothing is ever outside it, but then the working directory stops isolating projects, which is the reason to set one.
Steps to reproduce
- Open a session with the working directory set to
~/projects/project-a. - Get Claude to write a file to
~/projects/project-b/out.png, granting access when asked. - Ask for a markdown link to that file and click it. The viewer refuses to open it.
- Have Claude call
request_directoryon~/projects/project-b. The same link now opens. - Start a new session and click the link again. Dead again.
Environment
Claude desktop app 1.52386.3, claude-code 2.1.266, macOS 15.5, Apple Silicon.
I've hit this in four separate sessions on different projects, and each time it took several messages to work out what was wrong, because the link looks correct and the file is right there on disk.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗