[FEATURE] replace `#` to `>` when using "Show last response in external editor (ctrl+g)"

Status Open
Reported on v2.1.268
Maintainer reply None cached
Activity 0 comments · opened Sep 11, 2026

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

With "Show last response in external editor" enabled in /config (externalEditorContext), ctrl+g writes $TMPDIR/claude-prompt-<uuid>.md: a banner line, the last response with every line prefixed # (a bare # for an empty line), a marker line # ─── Write your reply below this line ───…, then the reply area.
On save, everything up to and including the marker is discarded, so the quoted block is reference only.

The writer, from the 2.1.268 binary (names minified):

e.map((o)=>o?`# ${o}`:"#").join("\n")

Problem

# as a "not part of the message" prefix is the git COMMIT_EDITMSG convention, where git itself strips those lines.
This file is .md, so every markdown-aware editor (Helix, Neovim, VS Code, Zed) applies markdown rules, and the one convention markdown does not share with git is that # means a heading.
The result is a wall of H1 lines in heading colour, and the response's own ## Title lines become # ## Title.

Proposed Solution

Prefix the quoted lines with > instead.
> is markdown's quote syntax, so the block renders as a quote and still reads as "Claude said this".
Stripping the prefix entirely would be worse: the response would be indistinguishable from the reply area.
The change is the one map line:

e.map((o)=>o?`> ${o}`:">").join("\n")

Alternative Solutions

I have my own shell wrapper, that I use only for Claude, which replaces #.

so for me the problem is solved, but I guess others can benefit from this.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗