claude-code - 💡(How to fix) Fix [BUG] Claude Desktop file sidepane refuses to render plan files in ~/.claude/plans/ ("outside session folder") [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#50798Fetched 2026-04-20 12:12:45
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

In Claude Desktop, clicking a markdown link to a plan file under ~/.claude/plans/ displays the error:

File could not be read. It may have been deleted or moved, or it lives outside the session folder.

The file exists and is readable from any terminal — the sidepane is (correctly) computing that ~/.claude/plans/ sits outside the current session's working directory and blocking it on purpose. But plan files are always written there by the plan-mode workflow. So the link target the assistant generated one message ago can't be opened in the pane.

Inconsistency: in my own session, a link in one message failed with the "outside session folder" error, but re-linking to the same file from a later message rendered it successfully. I don't have a deterministic repro for the render-success path yet, only for the failure path.

Error Message

In Claude Desktop, clicking a markdown link to a plan file under ~/.claude/plans/ displays the error: Inconsistency: in my own session, a link in one message failed with the "outside session folder" error, but re-linking to the same file from a later message rendered it successfully. I don't have a deterministic repro for the render-success path yet, only for the failure path. Available on request — two side-by-side states (error vs. successful render of the same file).

Root Cause

The plan-file workflow is the documented way to review a plan before approving it. If the user can't view the plan in the sidepane, they either read it in the chat transcript (fine for short plans, awkward for long ones) or open it from a terminal (defeats the purpose of the integrated UI). The sidepane restriction is defending against something reasonable (cross-session data leakage) but plan files are first-class artifacts of the session, not arbitrary outside-world files — they should be whitelisted.

RAW_BUFFERClick to expand / collapse

Summary

In Claude Desktop, clicking a markdown link to a plan file under ~/.claude/plans/ displays the error:

File could not be read. It may have been deleted or moved, or it lives outside the session folder.

The file exists and is readable from any terminal — the sidepane is (correctly) computing that ~/.claude/plans/ sits outside the current session's working directory and blocking it on purpose. But plan files are always written there by the plan-mode workflow. So the link target the assistant generated one message ago can't be opened in the pane.

Inconsistency: in my own session, a link in one message failed with the "outside session folder" error, but re-linking to the same file from a later message rendered it successfully. I don't have a deterministic repro for the render-success path yet, only for the failure path.

Repro

  1. In a project, open plan mode (Shift+Tab cycle) and ask for anything that produces a plan file. The file will be written to ~/.claude/plans/<name>.md.
  2. Exit plan mode. The transcript contains a markdown link to the plan file (relative path from the session folder, which resolves into ~/.claude/plans/).
  3. Click the link.
  4. Expected: sidepane renders the plan file.
  5. Actual: sidepane shows File could not be read. It may have been deleted or moved, or it lives outside the session folder.

File location is discoverable by running ls ~/.claude/plans/ — the file is there with the correct size/content.

Why this matters

The plan-file workflow is the documented way to review a plan before approving it. If the user can't view the plan in the sidepane, they either read it in the chat transcript (fine for short plans, awkward for long ones) or open it from a terminal (defeats the purpose of the integrated UI). The sidepane restriction is defending against something reasonable (cross-session data leakage) but plan files are first-class artifacts of the session, not arbitrary outside-world files — they should be whitelisted.

Suggested fix directions (take your pick)

  • Whitelist ~/.claude/plans/ (and probably ~/.claude/projects/<project>/memory/ for the same reason) in the sidepane's path allowlist.
  • Or: write plan files into the session folder's .claude/ subdirectory instead of the global ~/.claude/plans/, then the existing sidepane check just works.
  • Or: have the assistant's auto-generated plan-file links use a custom claude:// URI that goes through a privileged renderer rather than the filesystem-path renderer.

Environment

  • Claude Code version: 2.1.105
  • Model: Claude Opus 4.7 (1M context)
  • OS: Linux (CachyOS, kernel 7.0.0-1-cachyos)
  • Context: Desktop app file sidepane, plan mode workflow

Screenshots

Available on request — two side-by-side states (error vs. successful render of the same file).


Written by Claude Opus 4.7 (1M context) via Claude Code

extent analysis

TL;DR

The issue can be resolved by whitelisting the ~/.claude/plans/ directory in the sidepane's path allowlist or by writing plan files into the session folder's .claude/ subdirectory.

Guidance

  • The sidepane is correctly identifying ~/.claude/plans/ as outside the current session's working directory, which is causing the error.
  • To verify the issue, try clicking on a markdown link to a plan file and check if the sidepane displays the error message.
  • One possible mitigation is to manually open the plan file from the terminal using the path ~/.claude/plans/<name>.md.
  • The suggested fix directions provided in the issue, such as whitelisting the directory or writing plan files to the session folder, can be explored to resolve the issue.

Example

No code snippet is provided as it is not explicitly mentioned in the issue.

Notes

The issue seems to be specific to the Claude Desktop app and its handling of plan files. The provided environment details, such as the Claude Code version and OS, may be relevant in troubleshooting the issue.

Recommendation

Apply a workaround by whitelisting the ~/.claude/plans/ directory in the sidepane's path allowlist, as this seems to be the most straightforward solution. This approach allows plan files to be accessed from the sidepane while maintaining the existing security restrictions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING