Restoring a compacted conversation

Restore the most recent compaction of a conversation in Cloudera Agent Studio to bring back the original history in the context of the agent.

The /restore command undoes the most recent active compaction. Because Agent Studio keeps the original messages, the earlier view of the context returns without a rebuild from the summary. If the conversation has more than one active compaction, each /restore undoes one compaction. See Context, compaction, and token usage.

A restore is not a message rewind, it does not roll back the effects of tools, and it does not delete a session.

  • Open a chat with an available agent, and wait until the chat is ready. See Slash commands in chat.
  • Make sure that the conversation has a compaction to undo.
  • Make sure that no run is active or paused. The runtime refuses a restore while a run is active, including a run that waits for your input. Resolve the pause, wait for the run to finish, or stop the run.
  1. In the message box, enter /restore, and then press Enter.
    Do not add text after the command. Agent Studio ignores it.
  2. Review the command card.
  3. In the message box, enter /context, and then press Enter to check the occupancy of the context window.
    The context usage can rise sharply after the history unfolds. The threshold tile shows paused.
  4. Continue the conversation with an ordinary message.

The context of the conversation includes the history that the most recent compaction folded. Agent Studio pauses automatic compaction until you submit /compact again. If the conversation has no compaction, the card shows Nothing to restore - no compaction to undo.

To resume automatic compaction, or to reduce the context again, see Compacting a conversation.