claude-code - 💡(How to fix) Fix Desktop: file pane should remember pinned/open files across session restarts [1 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#56034Fetched 2026-05-05 05:59:52
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Problem

When I close Claude Desktop (Code tab) and reopen the same session, the pane layout is restored but the content of the file pane is not — any .md / code file I had open is gone, and I have to re-locate the path in chat or the tree to reopen it.

For workflows where the same reference file is needed every day (a daily-review note, an architecture doc, a checklist), this is a constant small friction tax.

Proposed solution

Two complementary mechanisms:

  1. Auto-restore last open file(s) — by default, the file pane should reopen whatever was open when the session was last closed/suspended. Same way the pane layout is restored.
  2. Pin a file — right-click in the file-pane header → "Pin" — pinned files always reopen on session start, even after Discard/close. Stored per-session under ~/.claude/projects/<project>/<session>.json (or equivalent).

Scope

  • Local sessions only (matches current file-pane availability — remote/SSH sessions excluded per docs).
  • File pane only — the terminal pane (cwd) is already implicit via the session.

Why

  • Pane-layout positioning already persists; file content is the missing half.
  • The "pinned files" pattern matches VS Code, JetBrains IDEs, and Sublime — well-understood UX.
  • Backend complexity is small — persist {filePath, scrollOffset} per file pane.

Environment

  • Claude Desktop v1.2581.0 or later (per docs that mention layout-pane support).
  • Affects all platforms; same request applies on macOS / Windows / Linux.

Related issues

  • #43262 — workspace-level session save/restore (CLI; adjacent problem)
  • #51746 — auto-open files and terminals for mentioned paths (different surface)
  • #48911 — sidebar panel positioning (layout config)

extent analysis

TL;DR

Implementing auto-restore of last open files and a "pin file" feature can resolve the issue of lost file content in the file pane upon reopening a session.

Guidance

  • To address the problem, consider implementing a mechanism to store the last open files and their scroll offsets when a session is closed, similar to how pane layout is currently persisted.
  • The proposed "pin file" feature, stored per-session under ~/.claude/projects/<project>/<session>.json, could provide a complementary solution for frequently used files.
  • Reviewing related issues, such as #43262 and #51746, may provide additional insights into session save/restore and auto-opening files.
  • Ensure that any solution is compatible with Claude Desktop v1.2581.0 or later and works across all platforms (macOS, Windows, Linux).

Example

No specific code example is provided due to the lack of technical implementation details in the issue.

Notes

The solution should focus on local sessions only, as remote/SSH sessions are excluded per documentation. Additionally, the file pane is the primary concern, as the terminal pane's current working directory is already persisted via the session.

Recommendation

Apply a workaround by manually noting down the paths of frequently used files or using an external tool to manage session state until a formal solution is implemented, as the issue lacks enough information for a direct code-based fix.

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

claude-code - 💡(How to fix) Fix Desktop: file pane should remember pinned/open files across session restarts [1 participants]