[FEATURE] Multi-line Input Mode with Termination Token

Resolved 💬 3 comments Opened Feb 20, 2026 by Harshal-Git Closed Feb 24, 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

#Summary
Add support for multi-line input in the Claude Code terminal, allowing users to compose longer, more complex prompts without interruption by the Enter key.

Problem

Currently, pressing Enter immediately submits the input to Claude, making it difficult to:

  • Compose longer, multi-paragraph prompts
  • Paste content with newlines
  • Think through and edit complex requests before submitting
  • Include code snippets or structured data in prompts

Proposed Solution

Implement a multi-line input mode where:

  1. Users can press Enter to create new lines without submitting
  2. A special termination token (e.g., ;;;, END, or //submit) signals the end of input
  3. Alternatively, a keyboard shortcut (e.g., Ctrl+D or Ctrl+Enter) could submit multi-line input

Alternative Solutions

_No response_

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

Use Cases

  1. Complex technical questions - Providing full context with multiple paragraphs
  2. Pasting code or logs - Including newline-formatted content without pre-processing
  3. Structured requests - Writing numbered lists, bullet points, or step-by-step instructions
  4. Thoughtful composition - Being able to edit and review before submitting
  5. Batch operations - Describing multiple related tasks in a structured format

Additional Context

Example Usage

Current behavior:

> This is my prompt [ENTER]
[Immediately submitted, can't add more lines]

Proposed behavior:

> This is my prompt [ENTER]
> I want to add more context [ENTER]
> Here's some additional information [ENTER]
> ;;; [ENTER]
[Now submitted as complete multi-line input]

Or with keyboard shortcut:

> This is my prompt [ENTER]
> I want to add more context [ENTER]
> Here's some additional information [CTRL+ENTER]
[Submitted]

Similar Implementations

Many CLI tools support multi-line input:

  • Postgres psql: Uses ; to terminate SQL statements
  • MongoDB shell: Detects incomplete statements and allows continuation
  • Python REPL: Allows multi-line input for functions/classes
  • Redis CLI: Supports multi-line commands with continuation
  • MySQL CLI: Uses ; or \G terminators

Alternative Approaches

  1. Termination token (e.g., ;;;, END, //submit) - Explicit and clear
  2. Keyboard shortcut (e.g., Ctrl+D, Ctrl+Enter) - Fast for power users
  3. Mode toggle (e.g., /multiline to enter, /submit to send) - Explicit mode switching
  4. Smart detection - Auto-detect incomplete input (like incomplete code blocks with `````)

Benefits

  • ✅ Better UX for complex prompts
  • ✅ Reduces errors from accidentally submitting incomplete thoughts
  • ✅ Enables better prompt composition workflow
  • ✅ Supports pasting multi-line content directly
  • ✅ Aligns with common CLI tool patterns

Configuration

Could be made configurable in ~/.claude/config.toml:

[input]
# Options: "immediate" (current), "token", "ctrl-d", "ctrl-enter"
submit_mode = "token"
termination_token = ";;;"

View original on GitHub ↗

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