claude-code - 💡(How to fix) Fix Webview input frequently loses focus on Remote-SSH, breaking Cmd+V/Cmd+C [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#47876Fetched 2026-04-15 06:39:47
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Fix Action

Fix / Workaround

Workarounds

  • Right-click → Paste
  • Developer: Reload Window
RAW_BUFFERClick to expand / collapse

Environment

  • Client: Cursor (VSCode fork) on macOS
  • Extension: Claude Code for VS Code v2.1.107
  • Mode: Remote-SSH (extension runs on remote Linux VPS)

Symptom

In the Claude Code chat input (webview), Cmd+V (paste) and Cmd+C (copy) frequently stop working. Right-click → Paste still works, which suggests the webview itself can receive paste, but the keyboard shortcut doesn't reach it.

Recovering requires running Developer: Reload Window. The issue recurs multiple times per session.

Reproduction

  1. Open Cursor, connect to a remote host via SSH
  2. Open Claude Code extension chat panel
  3. Use the extension normally for a while
  4. Eventually Cmd+V/Cmd+C in the chat input stops responding

Not tied to a specific action — appears tied to webview focus state drift over time.

Hypothesis

Looks like the webview intermittently fails to register focus with the VSCode host, so native clipboard shortcuts have no target. More frequent under Remote-SSH than local.

Workarounds

  • Right-click → Paste
  • Developer: Reload Window

Request

Investigate whether the chat input webview can more reliably claim focus, or register explicit keybindings for clipboard actions within the webview context.

extent analysis

TL;DR

The issue can be mitigated by implementing explicit keybindings for clipboard actions within the webview context or improving the webview's ability to claim focus.

Guidance

  • Investigate the webview's focus management to determine why it intermittently fails to register focus with the VSCode host.
  • Consider registering explicit keybindings for clipboard actions (e.g., Cmd+V, Cmd+C) within the webview context to ensure they work even when the webview doesn't have focus.
  • Review the Remote-SSH connection setup to see if there are any configuration options that could improve the webview's focus behavior.
  • Test the extension with different webview focus states to identify any patterns or triggers for the issue.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue seems to be related to the webview's focus state and its interaction with the VSCode host. The provided workarounds (Right-click → Paste and Developer: Reload Window) suggest that the issue is not with the clipboard functionality itself, but rather with the webview's ability to receive keyboard shortcuts.

Recommendation

Apply a workaround by registering explicit keybindings for clipboard actions within the webview context, as this approach directly addresses the suspected root cause of the issue and can provide a more reliable solution.

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 Webview input frequently loses focus on Remote-SSH, breaking Cmd+V/Cmd+C [1 comments, 2 participants]