[BUG] Ctrl+G prompt editor inserts extra blank lines and the literal string “Markup Types Before Each Line”

Resolved 💬 10 comments Opened Oct 21, 2025 by webmasterfsd Closed Feb 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the Claude Code CLI prompt editor via the Ctrl+G keybinding, saving the prompt causes the CLI to paste the prompt back into the input with (a) extra empty lines and (b) an unexpected string, Markup Types Before Each Line, sometimes prepended and sometimes interleaved between lines. This corrupts the prompt and requires manual cleanup before it can be executed.

Environment

OS: Windows 11

What Should Happen?

Expected Behavior

The exact prompt text is inserted once, with original line breaks preserved and no additional text added.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

Open the Cloud/Claude Code CLI.

Press Ctrl+G to open the prompt editor (new or edit flow).

Type or paste a multi-line prompt (10–30 lines is enough).

Save/confirm to insert the prompt back into the CLI input.

Observe the pasted content in the input area.

Actual Behavior

The inserted content contains:

Multiple extra blank lines (one or more between existing lines).

The literal string Markup Types Before Each Line appearing at the start and/or interleaved throughout the prompt.

The resulting input is corrupted and requires manual cleanup (removing blank lines and the stray string) before running.

Reproducibility

Frequency: 100% (reproduces every time using Ctrl+G flow)

Scope: Occurs with both newly created and edited prompts

Prompt size: Happens with short and long prompts alike

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Version 2.0.24

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗