Skip to main content
ChatCLI supports multiline text input in all modes (Chat, Agent, and Coder), allowing you to organize your messages, paste code snippets, or send complex instructions without each Enter submitting the message.

How It Works

The --- delimiter (three or more dashes) controls multiline mode:
  1. Open: Type --- on a line by itself and press Enter
  2. Write: Each Enter adds a new line (does not submit)
  3. Close and send: Type --- again on a line by itself
The delimiter accepts 3 or more dashes (---, ----, -----, etc.). They all work the same way.

Examples by Mode

Chat Mode (main prompt)

> ---
  Multiline mode — type --- on a new line to finish
  ... [1] I need help with a complex problem.
  ... [2] I have a REST service that needs:
  ... [3] - JWT authentication
  ... [4] - rate limiting
  ... [5] - email validation
  ... [6] ---
All 5 lines are sent as a single message to the AI.

Coder Mode (waiting for user response)

When the AI in /coder mode asks a question and waits for your response, you can also use multiline:
  Waiting for your response (--- for multiline, 'exit' to finish): ---
  Multiline mode — type --- on a new line to finish
  ... [1] PostgreSQL on port 5432
  ... [2] Host: db.internal
  ... [3] Database: myapp_prod
  ... [4] Use pgx as driver
  ... [5] ---
The complete response is added to the history and the AI continues the ReAct cycle with all the information.

Agent Mode

The same mechanism works in /agent mode when the system requests user input.

Cancelling Multiline

ModeHow to cancelResult
ChatCtrl+CDiscards all accumulated text, shows [multiline cancelled]
Agent/CoderCtrl+CCancels the current operation (default Ctrl+C behavior)

Continuation Prompt

While multiline mode is active, the prompt changes to show the line number:
  ... [1] first line
  ... [2] second line
  ... [3] third line
This makes it easy to know how many lines you’ve typed and maintain visual organization.

When to Use

Complex Instructions

When your request has multiple requirements or constraints that are clearer organized on separate lines.

Detailed Responses

When the AI asks something in Coder mode and you need to provide several pieces of information at once (database, host, credentials, etc.).

Structured Context

When you want to send a specification, task list, or bug description formatted in multiple lines.

Code Snippets

When you need to paste or type a code snippet as part of the message.

Technical Details

  • The MultilineBuffer component is shared across all modes
  • In Chat mode, go-prompt displays the continuation prompt via changeLivePrefix
  • In Agent/Coder mode, readMultiline() reads from the centralized stdinLines channel
  • Empty lines (Enter without text) are included normally in the multiline content
  • The opening and closing delimiters are not included in the final text