[FEATURE] CLI: Support clipboard image paste in VS Code devcontainer via IPC
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Description:
When running Claude Code inside a VS Code devcontainer, pasting images (Ctrl+V) works in the VS Code extension but fails silently in the CLI.
Analysis:
The extension works because its chat UI is a webview running in VS Code's Electron renderer process on the host machine. It intercepts the DOM paste event (event.clipboardData) in the browser context, then sends the image bytes into the container via VS Code's protocol:
[Host clipboard] → [VS Code Electron renderer] → [VS Code protocol] → [Container]
The CLI runs inside the container and has no access to the host clipboard. Standard clipboard tools (xclip, wl-clipboard) require a display server (DISPLAY/WAYLAND_DISPLAY) which devcontainers don't have. The host may also be Mac or Windows, making X11/Wayland tools irrelevant.
Proposed Solution
When the CLI detects it is running inside a VS Code devcontainer (detectable via VSCODE_IPC_HOOK_CLI env var being set), it could request clipboard image data from the VS Code host process over the existing IPC socket — the same channel used by the code CLI for commands like opening files.
This would give the CLI the same clipboard image access path the extension already uses, without any host-side setup or security concerns (paste remains an explicit, user-initiated action).
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- copy an image in the host
- Open devcontainer
- Launch claude code cli in terminal
- Paste the imge -> not workoing
Additional Context
Environment:
Claude Code CLI version: 2.1.109
VS Code devcontainer (Docker, Linux container, Mac or Windows host)
VSCODE_IPC_HOOK_CLI is present in terminal env inside devcontainer
CLAUDE_CODE_ENTRYPOINT=claude-vscode is set
Workaround today:
Use the VS Code extension instead of the CLI terminal for image paste. No devcontainer-side fix is possible without host-side tooling.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗