# Chat and modes

> Talk to the KazoCode agent in the chat panel. Pick Agent, Plan, Edit or Ask mode, stop or steer a running task, and rewind by editing a message.

The chat panel is where you work with the agent. Open or hide it with `Ctrl+Shift+I`. Each chat is a conversation with its own history, so you can keep one per task and pick an earlier one up again with `/resume`.

## Modes

Pick a mode from the menu under the message box. The mode decides what the agent is trying to do and which tools it is offered.

| Mode | Use it to | What the agent does |
| --- | --- | --- |
| **Agent** | Describe what to build | Reads, edits, runs commands and checks its work until the task is done |
| **Plan** | Break the work into steps first | Researches the code and writes a plan for you to review before anything changes |
| **Edit** | Edit or refactor selected code | Focuses on the code you point it at |
| **Ask** | Explore and understand your code | Answers questions and reads code without changing files |

Plan mode is the safest way to start large changes: read the plan, ask for changes to it, and approve it when it's right. The agent then carries it out.

## Sending a message

Type in the message box and press `Enter`. `Shift+Enter` adds a new line. Add files and other context with `@` (see [Adding context](https://kazocode.app/docs/agent/context.md)), or paste an image. Commands start with `/`; see [Slash commands](https://kazocode.app/docs/agent/commands.md).

While the agent works, the chat shows what it is doing: the files it reads, the commands it runs, and each file it changes as a change row you can open as a diff.

## Stop and steer

- **Stop** ends the current task. Changes already made stay in the chat, where you can keep or undo them.
- `/stop` cancels every running agent, including [sub-agents](https://kazocode.app/docs/agent/agents.md).
- To change direction, stop and send a new message, or edit an earlier one.

## Edit a message to rewind

Editing one of your earlier messages rewinds the conversation to that point. Every later turn is removed and the files the agent changed after it go back to how they were, so you can try the request again a different way.

## Long conversations

KazoCode keeps track of how much of the model's context window the conversation uses; `/context` shows it. When a conversation gets long it is summarized automatically so the agent can keep going, and `/compact` does that on demand. A summary always ends with your latest request word for word, so nothing you asked for is lost.

## Export a conversation

`/export` saves the conversation as Markdown to a file or the clipboard, and `/rename` gives it a name you'll recognize later.
