Starting and steering an agent
The composer's controls, what you can attach, and how to redirect, stop, fork, or rewind an agent.
You start an agent from the composer on the Agents page, or from a project's page. After that, the composer at the bottom of the thread sends the agent its next message. For a step-by-step walkthrough, see Start an agent.
The first message
The composer for a new agent has these controls:
- Works on: a project, up to 10 repositories, or No repository. See Overview.
- Machine: the size of the agent's computer. It is set when the agent starts and cannot be changed later. See Computers.
- Permission mode: Plan, Ask, or Auto. See Permissions and approvals.
- Model: the model and effort for this message. See Models.
The agent is named after the first line of your first message. A message can be up to 20,000 characters.
Under the composer, starter prompts suggest a first message. Select Hide to put them away, or turn Starter prompts off in Settings > Appearance.
Attachments and context
Use the attach menu (Add files and context) to add files to any message:
- Up to 5 files a message, each up to 10 MB.
- Images in PNG, JPEG, GIF, or WebP, and plain text files.
- Pasted text of 12 lines or 1,200 characters or more becomes a Pasted text attachment.
Type @ to mention a file from the agent's repositories, or a repository or project. The agent gets the content of the files you mention with your message: up to 10 files, with up to 20,000 characters of each and 60,000 in all.
Type / to run a command or a skill. See Slash commands.
You can also dictate a message with Dictate. A recording can be up to 2 minutes long, and the agent's reply to a dictated message is read aloud.
Steering while it works
You do not have to wait for a turn to finish. Send a message while the agent is working and it is queued: the thread shows it as Queued until the agent gets to it. A text-only message reaches the agent during its current turn, so it can change course without starting over. A message with files starts a turn of its own when the current one ends.
Up to 5 messages can wait at once.
To end the turn now, press the stop button in the composer (Stop the agent). The agent keeps its conversation and its files, and your next message continues from there.
Fork from a message
Fork starts a new agent with the conversation up to a message and its reply. The new agent gets its own computer and a fresh copy of the repositories, so file changes made in the original are not carried over. The original agent stays as it is.
Rewind
Rewind takes an agent back to before one of your messages. Its files go back to how they were when you sent it, the agent forgets that message and everything after it, and the message returns to the composer so you can edit it.
Rewind does not undo commits already pushed, pull requests, anything sent or run outside the repository folder, or ignored files such as installed packages. Select Undo rewind to go back, as long as no message was sent after the rewind.
Fork and rewind are offered when the agent is not working and nothing is queued.
Wake-ups
An agent can ask to be woken later in the same thread, for example to check on a build. You approve the request first. The thread then shows when the agent wakes itself, with Cancel to call it off. A wake-up can be at most seven days away, and only one waits at a time.
Export
Open the agent's menu and select Export to download the conversation as Markdown or JSON.