claude-code - 💡(How to fix) Fix Option to disable auto-opening of Preview panel when switching sessions [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#46116Fetched 2026-04-11 06:28:35
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2labeled ×2

Code Example

"previewPanelAutoRestore": false
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

When switching between sessions in Claude Code Desktop, the Preview panel on the right side automatically reopens if that session previously had preview activity. This is disruptive to users who prefer a minimal workspace — the panel keeps appearing even when I have no intention of using the preview in the current session.

Additional context: all my sessions are opened under the same working directory path. This may mean the preview state is being keyed by directory rather than by session, causing the panel to auto-restore for every session switch, regardless of whether the specific session actually needs the preview.

Proposed Solution

Add a configuration option (e.g., in ~/.claude.json or settings.json) to control whether the Preview panel automatically restores its state when switching sessions:

"previewPanelAutoRestore": false

With this set to false, the Preview panel would remain closed on session switch and only open when the user explicitly clicks to open it. The default behavior (auto-restore) would remain unchanged for users who prefer it.

Alternative Solutions

No response

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

extent analysis

TL;DR

To prevent the Preview panel from automatically reopening when switching sessions, consider adding a configuration option to control its auto-restore behavior.

Guidance

  • Investigate the feasibility of introducing a previewPanelAutoRestore configuration option, as proposed, to provide users with control over the Preview panel's behavior.
  • Verify that the issue is indeed caused by the preview state being keyed by directory rather than by session, to ensure the proposed solution addresses the root cause.
  • If implementing the proposed solution, ensure that the default behavior remains unchanged for users who prefer the auto-restore functionality.
  • Consider testing the solution with different working directory paths to confirm its effectiveness.

Example

No code snippet is provided, as the issue does not contain sufficient technical details to create a minimal example.

Notes

The proposed solution assumes that the issue is caused by the preview state being tied to the working directory rather than the session. However, without further technical investigation, it is uncertain whether this is the sole cause of the problem.

Recommendation

Apply workaround: Introduce a previewPanelAutoRestore configuration option to provide users with control over the Preview panel's behavior, as this approach allows for a flexible solution that caters to different user preferences.

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