Skip to content
BENIBIX Learn

--prompt-suggestions Flag

Also known as claude --prompt-suggestions, prompt_suggestion

It adds a guess at the next prompt to the stream.

Think of it like

It is like a friend who guesses what you will ask next and says it for you.

Example

Lucy's app shows one button under each reply. Its label comes from the prompt_suggestion message, so the user can go on with one tap.

Why it matters

A good next step on a button saves the user from thinking of what to type.

Definition

--prompt-suggestions adds a guess at your next prompt to the stream after each turn. The guess comes as a prompt_suggestion message. A very short chat may get none. It needs -p, --output-format stream-json and --verbose. An app can show the guess as a button the user taps.

Example code

bash
claude -p --prompt-suggestions --output-format stream-json --verbose "Explain this file"
Get a suggested next prompt after each turn.

Common mistake

Expecting a guess every turn. Short chats may not get one, so the app has to work without it.

Key takeaways

  1. 1
    After each turn. When there is one.
  2. 2
    prompt_suggestion. The message type.
  3. 3
    Needs --verbose. And stream-json.

Learn it properly