Compact and clear the assistant's context

The assistant's message box supports two commands for long conversations: /compact summarises the older turns, and /clear-context makes the assistant forget the conversation. A message that is exactly a command runs as a command instead of being sent as text. If you are new to the panel, see The AI assistant; the message box controls are in Write and send messages to the assistant.

Compact the conversation

  1. Type /compact in the message box and send it, or pick it from the / menu.
  2. While it runs, a Compacting conversation… pill shows above the message box. When it finishes, a Conversation compacted marker appears in the conversation.

Compacting summarises the older turns of the conversation, so the assistant keeps the gist of them and frees up room for what comes next. It starts straight away, without a confirmation step.

Clear the assistant's context

  1. Type /clear-context in the message box and send it, or pick it from the / menu.
  2. In Clear the assistant's context?, click Clear context. Nothing is cleared until you confirm.

The dialog explains what happens: "The assistant will forget everything that happened in this chat. Your messages stay visible in the transcript, but the next reply starts from a blank slate. This cannot be undone."

After a clear:

If you want the assistant to keep the gist of the conversation instead, use /compact.

Warning

A cleared context cannot be undone. Your messages stay visible, but the assistant forgets everything that happened in the conversation.

When a command does not run

Questions, answered

Which commands can I use in the assistant's message box?

Two: /compact and /clear-context. Type either one in the message box and send it, or pick it from the / menu. A Mind's own chat has the same two commands and more; see Chat commands, shortcuts and privacy.

What does /compact do?

It summarises the older turns of this conversation, so the assistant keeps the gist of them and frees up room for what comes next. It runs as soon as you send it, and a Conversation compacted marker appears where it happened.

Does clearing the context delete my messages?

No. Your messages stay visible in the conversation. The assistant forgets them, and its next reply starts from a blank slate. The confirmation says this cannot be undone.

Why did the context ring drop to zero?

You cleared the context. The ring shows the conversation's token usage, and nothing above the Context cleared marker reaches the model, so it reads zero and the conversation starts again from there.

Why doesn't the command menu open?

It stays closed while a question waits for your answer, or while an answer is streaming. Answer the question or wait for the reply to finish, then try again.

I ran a command and saw "Nothing to compact". What does that mean?

There is nothing to work on yet: you need a conversation with some history. The toast adds "Open a conversation with some history first." Open a conversation, or chat for a few turns, then try again. In the same case, /clear-context shows Nothing to clear.

What do "Compaction skipped" and "Compaction failed" mean?

The command did not go through, and nothing changed in the conversation. Send it again.

Why does the toast say "Context not cleared"?

The clear did not go through, so the conversation was left as it was and the assistant still remembers it. Send the command again.