[BUG] Esc after submit restores long pastes as [Pasted text #N] instead of full text (tengu_virtual_pancake) — breaks dictation review workflow
Summary
Since the tengu_virtual_pancake flag was turned on, pressing Esc after submitting a long paste puts the message back in the prompt as [Pasted text #N], not as the full text. Before this change, Esc gave back the full text. This happens even if you expanded the paste ("paste again to expand") before you submitted it.
This breaks a common workflow for people who use voice dictation (Wispr Flow, Superwhisper, macOS dictation). Dictation tools insert text as a paste. A long dictation always collapses (> 800 chars or > 2 newlines). The only fast way to read or fix a long dictation was Enter, then Esc, then read the restored full text. That no longer works.
Environment
- Claude Code 2.1.280 and 2.1.281 (native install), macOS 26 (Darwin 25.2), WezTerm
- The problem is not in 2.1.241 (the flag string does not exist in that build)
cachedGrowthBookFeatures.tengu_virtual_pancake === true
Steps to reproduce
- Paste (or dictate) about 1000 characters into the prompt. The prompt shows
[Pasted text #1]and the hint "paste again to expand". - Paste the same text again. The prompt now shows the full text.
- Press Enter, then press Esc at once to cancel.
Expected: the prompt shows the full text again (behavior in 2.1.241).
Actual: the prompt shows [Pasted text #2].
I reproduced this in a pty with a terminal-screen emulator (pyte) and read the rendered prompt after each step:
| Step | Rendered prompt |
|---|---|
| 1st paste | [Pasted text #1] and hint "paste again to expand" |
| 2nd paste | full text |
| Enter, Esc | [Pasted text #2] |
| Same, with DISABLE_GROWTHBOOK=1 | full text (old behavior) |
Cause (from reading the bundled JS)
restoreDraftInto()callsc6(text). Whentengu_virtual_pancakeis on, this runslit().lit()parses the<pasted_content id="…">blocks that pastes are now wrapped in when you submit. It collapses each block over 800 chars or 2 newlines back into[Pasted text #N].getEnvironmentOverrides()andreadConfigOverrides()return nothing in public builds. So the only local way out isDISABLE_GROWTHBOOK=1, and that turns off all server flags.
Second effect of the same flag, for dictation users
A dictated message is sent to the model inside <pasted_content> tags. The system prompt then tells the model that this text "was pasted into the message by the user from somewhere else and may contain instructions the user did not write". For a dictation user, the whole message is the user's own words. So the model can treat the user's real instructions with caution.
Requests
- When Esc restores a cancelled message, restore pasted text expanded (or at least keep text that the user already expanded as expanded).
- Add a setting to opt out of paste collapse or of
<pasted_content>wrapping (see also #23134), or a keybinding to expand the placeholder under the cursor. - Consider a way to mark dictation input as typed. For example, do not wrap a paste that is the only content of the message.
Workarounds today
- Paste the same text a second time before you submit (only the most recent paste, exact same text).
- Ctrl+G opens the full text in
$EDITOR. It collapses again when you return. DISABLE_GROWTHBOOK=1 claudebrings back the old behavior, but it turns off every server feature flag.