# --include-partial-messages Flag

> It streams the answer in small pieces as Claude writes it.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude --include-partial-messages, Partial messages

## Think of it like

It is like you watch a friend write, word by word. You do not wait for the whole note.

## Definition

--include-partial-messages adds the answer to the stream in small pieces, as Claude writes it. Without it, each message shows up only when it is done. It needs -p and --output-format stream-json. An app uses it to show the words as they come, so the user is not left looking at a blank screen.

## Example

Lucy's web app shows Claude's reply in a chat bubble. With --include-partial-messages, the words show up as Claude writes them.

## Example code

```bash
claude -p --output-format stream-json --verbose --include-partial-messages "Explain recursion"
```

Get the words as they are written.

## Why it matters

Users trust a reply they can see coming more than a long wait for a block of text.

## Common mistake

Saving each piece as a full message. The pieces add up to one message, which comes again whole at the end.

## Three principles

- **Small pieces.** As they are written.
- **Needs stream-json.** And -p.
- **Whole message.** Still comes at the end.

## Related terms

- [--output-format Flag](https://learn.benibix.com/term/ai/output-format-flag)
- [LLM Streaming](https://learn.benibix.com/term/ai/streaming-response)

## Taught in

- [Print Mode Output Flags](https://learn.benibix.com/learn/ai-claude-code-commands/print-mode-output-flags): Claude Code Commands, 14/17

![A stream-json run prints one event per line. Each stream flag adds one more kind of line.](https://learn.benibix.com/diagrams/flag-stream.svg)

---

Source: https://learn.benibix.com/term/ai/include-partial-messages-flag
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
