claude-code - 💡(How to fix) Fix [FEATURE] VSCode extension: Copy chat response as markdown source [2 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#54670Fetched 2026-04-30 06:39:16
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3commented ×2

Fix Action

Fix / Workaround

This is distinct from existing request #48489, which targets the Windows desktop app and whose workaround is presumably /copy in the CLI. In the VSCode extension there is no equivalent escape hatch — the chat panel is the only surface and it strips formatting unconditionally. #12413 (closed as duplicate) covered the same VSCode-specific concern but never received a targeted resolution.

Current workarounds, all unsatisfying:

  • Ask Claude to wrap the response in a fenced code block so the raw markdown is visible — adds turns, wastes tokens, and is forgotten between conversations.
  • Open the VSCode integrated terminal, run claude, and use /copy there — requires switching surfaces and loses the context of the ongoing VSCode-extension session.
  • Manually re-type markdown when pasting into PR descriptions, GitHub issues, or docs.
  • Switch chat mode from 'CLAUDE CODE' to 'CHAT' (VSCode's built-in): This still lists Claude chat sessions in it's session list and provides superior C&P functionality. Both Copy and Copy Final Response include markdown. This is the best workaround I've identified, but it is still a faff.
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

In the Claude Code VSCode native extension, selecting text in the chat panel and pressing Cmd+C / Ctrl+C copies only the rendered visible text. All markdown formatting is lost — code fences, bullets, headings, bold/italic, links, file-path hyperlinks, tables, etc. all collapse into plain prose.

Unlike the terminal CLI, the VSCode extension does not expose the /copy slash command (running it returns copy isn't available in this environment), and there's no context-menu item, toolbar button, or setting to copy the raw markdown instead.

This is distinct from existing request #48489, which targets the Windows desktop app and whose workaround is presumably /copy in the CLI. In the VSCode extension there is no equivalent escape hatch — the chat panel is the only surface and it strips formatting unconditionally. #12413 (closed as duplicate) covered the same VSCode-specific concern but never received a targeted resolution.

Proposed Solution

Any one of the following would solve it, in order of preference:

  1. Context-menu action on assistant messages: Right-click an assistant message (or a selection within it) → "Copy as markdown" → raw markdown source goes to the clipboard.
  2. Per-message copy button: A small copy icon on hover over each assistant message that copies the raw markdown of that message.
  3. Setting: claudeCode.copyRawMarkdown: true that makes the existing Cmd+C on a selection return markdown source instead of rendered text.
  4. Keybinding: A distinct shortcut such as Cmd+Shift+C that performs "copy as markdown" alongside the default plain-text copy.

Option 2 matches the pattern used by most LLM chat UIs (ChatGPT, Claude.ai web) and is the most discoverable.

Alternative Solutions

Current workarounds, all unsatisfying:

  • Ask Claude to wrap the response in a fenced code block so the raw markdown is visible — adds turns, wastes tokens, and is forgotten between conversations.
  • Open the VSCode integrated terminal, run claude, and use /copy there — requires switching surfaces and loses the context of the ongoing VSCode-extension session.
  • Manually re-type markdown when pasting into PR descriptions, GitHub issues, or docs.
  • Switch chat mode from 'CLAUDE CODE' to 'CHAT' (VSCode's built-in): This still lists Claude chat sessions in it's session list and provides superior C&P functionality. Both Copy and Copy Final Response include markdown. This is the best workaround I've identified, but it is still a faff.

Priority

High - Significant impact on productivity

Feature Category

Other

Use Case Example

  1. I ask Claude Code (in the VSCode extension) to summarize a bug investigation, and it replies with a nicely-formatted response containing headings, bullet lists, inline code, fenced code blocks, and [filename.ts:42](path#L42) links.
  2. I want to paste that summary into a GitHub PR description, a Linear ticket, or a Slack message with markdown mode enabled.
  3. Today: I select the text, Cmd+C, paste — and get a wall of plain prose. Headings gone, code blocks gone, links gone, file-path hyperlinks gone. I have to either manually reformat or ask Claude to regenerate as a fenced block (wasting context and tokens).
  4. With this feature: I click "Copy as markdown" on the message, paste into the PR — and the formatting is preserved end-to-end.

Additional Context

  • Environment: Claude Code VSCode native extension.
  • The terminal CLI already supports this via /copy <N>; the VSCode extension does not expose that command.
  • Related: #48489 (desktop app, Windows), #12413 (closed as duplicate without resolution), #5512 (CLI /copy — already shipped in the CLI).

extent analysis

TL;DR

Implement a "Copy as markdown" feature in the Claude Code VSCode extension to preserve markdown formatting when copying text from the chat panel.

Guidance

  • Consider adding a context-menu action or a per-message copy button to allow users to copy the raw markdown source of a message.
  • Introduce a setting, such as claudeCode.copyRawMarkdown: true, to make the existing copy shortcut return markdown source instead of rendered text.
  • Explore adding a distinct keybinding, like Cmd+Shift+C, for "copy as markdown" functionality.
  • Review related issues, such as #48489 and #12413, to ensure the solution addresses the specific needs of the VSCode extension.

Example

No code snippet is provided, as the issue focuses on the desired functionality rather than a specific implementation.

Notes

The solution should be tailored to the VSCode extension, considering its unique environment and limitations. The terminal CLI's /copy command is not applicable in this context.

Recommendation

Apply a workaround, such as switching to the "CHAT" mode in VSCode, until a native "Copy as markdown" feature is implemented in the Claude Code extension. This is because the "CHAT" mode provides superior copy and paste functionality, including markdown support.

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] VSCode extension: Copy chat response as markdown source [2 comments, 2 participants]