claude-code - 💡(How to fix) Fix [BUG] VS Code Extension - Current prompt & file visibility do not persist session switches [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#55134Fetched 2026-05-01 05:45:23
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In VS Code extension, opening the Session History and switching threads:

  1. Erases the current prompt (when not submitted)
  2. Resets the "showing Claude your current file selection" toggle

What Should Happen?

  • Draft prompts should survive session switches. Many workflows require checking on another session or approving an action in another session. The user doesn't expect to lose their prompt while switching sessions.

  • "Show Claude your current file selection" is a preference that should persist. Needing to continually turn this off is tiring for users that explicitly tell Claude which files to read (and not read).

Steps to Reproduce

  1. Open VS code extension and draft a prompt
  2. Click Session History and change session
  3. Return to the session in 1 - the prompt is gone

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by preserving the draft prompt and "showing Claude your current file selection" toggle state when switching sessions in the VS Code extension.

Guidance

  • Verify that the current implementation of session switching in the VS Code extension properly handles and preserves the state of draft prompts and user preferences.
  • Investigate the possibility of using a session-specific storage mechanism to retain the draft prompt and toggle state.
  • Consider adding a feature to automatically restore the previous session's state, including draft prompts and user preferences, when switching back to that session.
  • Review the extension's code to ensure that it correctly handles the persistence of user preferences, such as the "showing Claude your current file selection" toggle.

Example

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

Notes

The solution may require modifications to the VS Code extension's code to properly handle session switching and state persistence. The exact implementation details will depend on the extension's architecture and the Anthropic API.

Recommendation

Apply a workaround to preserve the draft prompt and toggle state when switching sessions, as the root cause of the issue is likely related to the extension's implementation of session switching.

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