claude-code - 💡(How to fix) Fix [FEATURE] Expose a command to resume previous session in VS Code/Cursor extension panel [1 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#55959Fetched 2026-05-05 06:01:53
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

This means power users cannot bind a keyboard shortcut (e.g. browser-style Cmd+Shift+T) to "reopen previously closed Claude Code session" in the panel. The only workaround is claude --continue in the integrated terminal, which lives in the terminal — not in the panel.

Code Example

{
  "key": "cmd+shift+t",
  "command": "claude-vscode.resumePreviousSession",
  "when": "!terminalFocus"
}
RAW_BUFFERClick to expand / collapse

Problem

The Claude Code VS Code/Cursor extension exposes ~22 commands via package.json, but none of them invoke the "Session history" picker or resume the most recent session within the panel. The "Session history" button in the panel header is purely React/webview state (toggles a modal via internal q(!G) state) and does not post a message to the extension host that could be wrapped in a registered command.

This means power users cannot bind a keyboard shortcut (e.g. browser-style Cmd+Shift+T) to "reopen previously closed Claude Code session" in the panel. The only workaround is claude --continue in the integrated terminal, which lives in the terminal — not in the panel.

Proposed solution

Register one or both of the following commands so they can be bound in keybindings.json:

  • claude-vscode.openSessionHistory — opens the Session history picker modal
  • claude-vscode.resumePreviousSession — directly resumes the most recently active session in the current workspace, in the panel

Example user keybinding:

{
  "key": "cmd+shift+t",
  "command": "claude-vscode.resumePreviousSession",
  "when": "!terminalFocus"
}

Why it matters

  • Browser-style "reopen closed tab" muscle memory is universal; users expect Cmd+Shift+T to work
  • claude --continue in terminal is functional but breaks the panel-centric workflow
  • The data is already there (sessions are listed via the existing webview UI) — only the command-host bridge is missing

Environment

  • Cursor (VS Code-based) with Claude Code extension v2.1.126
  • macOS

extent analysis

TL;DR

Registering the claude-vscode.openSessionHistory and claude-vscode.resumePreviousSession commands in package.json will allow users to bind keyboard shortcuts to reopen previously closed Claude Code sessions.

Guidance

  • Register the proposed commands claude-vscode.openSessionHistory and claude-vscode.resumePreviousSession in the package.json file to enable keyboard shortcut binding.
  • Update the extension to post a message to the extension host when the "Session history" button is clicked, allowing the registered commands to be invoked.
  • Test the new commands with a user keybinding, such as the example provided, to ensure the desired functionality.
  • Verify that the commands work as expected in different scenarios, including reopening a previously closed session and resuming the most recently active session.

Example

{
  "key": "cmd+shift+t",
  "command": "claude-vscode.resumePreviousSession",
  "when": "!terminalFocus"
}

This example keybinding binds Cmd+Shift+T to the claude-vscode.resumePreviousSession command, allowing users to reopen the most recently closed session.

Notes

The proposed solution assumes that the necessary functionality is already implemented in the extension, and only the command registration and keyboard shortcut binding are missing. If additional implementation is required, further development may be necessary.

Recommendation

Apply the workaround by registering the proposed commands and updating the extension to support keyboard shortcut binding, as this will provide the desired functionality for power users.

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 [FEATURE] Expose a command to resume previous session in VS Code/Cursor extension panel [1 comments, 2 participants]