Analysis Complete
Issue Summary
Title: Follow-up queue sends paste marker instead of full paste content
Type: Bug
Root Cause
In packages/coding-agent/src/modes/interactive/interactive-mode.ts, the handleFollowUp() method (triggered by Alt+Enter) reads editor content using:
The getText() method returns the raw editor state which includes paste markers like [paste #1 +15 lines]. It should instead use getExpandedText() which expands those markers to the actual pasted content.
Why the normal Enter works correctly:
The regular submit path (Enter key) goes through the Editor's internal handleInput() method in packages/tui/src/components/editor.ts (around line 668), which properly expands paste markers before calling the onSubmit callback:
But handleFollowUp() bypasses this path entirely by reading text directly from the editor.
Proposed Fix
File: packages/coding-agent/src/modes/interactive/interactive-mode.ts
Line 2249: Change:
To:
This follows the same pattern already used in openExternalEditor() at line 2363:
Files Affected
packages/coding-agent/src/modes/interactive/interactive-mode.ts (single line change)