All pages
Lesson 2.2 · Work with the agent · 12 min
Your first task
Ask in plain language, watch the tool calls, approve what runs.
In this lesson you hand the agent a real task, watch each tool call it makes, and approve or deny what it wants to run. You'll also learn to stop it, queue a follow-up, and use the one-click smart actions.
Time: 12 minutes · Works on: macOS app
Before you start
You need a model connected, from Connect a model, and a project with some code in it, from Projects.
Open the agent
- Select your project on the rail and open a tab in it.
- Open the right sidebar with
⇧⌘\and choose Agent. - Look at the header. It shows the model badge, the posture chip, and the working-directory chip. The working-directory chip names the folder the agent's tools run in. It should be your project's folder.
Each tab has its own conversation. Switch tabs and the sidebar shows that tab's chat.
Ask for something
- Click in the composer at the bottom and type a task in plain language,
for example:
Run the tests and tell me which ones fail. - Press Return to send.
⇧↩adds a new line instead.
The agent works in steps. Each step is a tool call, shown as a card in the transcript: reading a file, listing a folder, running a command, reading the terminal.
Approve what it runs
Every tool is classed as READ or WRITE. With the default posture, Approve, read tools run on their own and write tools wait for you. The Safety panel's Tools tab shows which class each tool is in.
- When a card asks for approval, read what it wants to do. For a command, that's the exact command line. For a file write, it's the diff.
- Press Approve to let it run, or Deny to refuse. The agent sees a denial and adjusts.
- To change the call first, press Edit args, edit the input, then press Approve edits.
- To stop being asked about something you trust, open Always… on the card. You can allow this tool, this path, this directory, or this host for the project.
You can work cards from the keyboard. ⌃J and ⌃K move between the turn's
tool cards, ⌘↩ approves the focused card, and ⌘⌫ denies it.
When one turn wants to write two or more files, a banner shows how many file changes are pending. Uncheck any file you don't want, then press Approve all, which also denies the unchecked ones. Deny all refuses the whole batch.
Stop, queue and continue
- Press
⌘.or the stop button to end the turn. Any tool call that hadn't started yet is marked canceled. - Type while a turn is still running and press Return to queue your next prompt. Queued prompts send in order as each turn finishes. Stopping a turn clears the queue.
- If a reply hits the model's length limit, it says so. Send
continueto pick up where it stopped.
Give it more to work with
- Drag, drop or paste an image into the composer to attach it to your next message.
- Press
⌃⌘Sfrom any app to take a screenshot and attach it to the chat. Drag a region, or press Space to capture a window. - Type
@and a path to include a file's contents in your message.
Smart actions
Once the conversation has a few messages, a row of chips appears above the composer: fix last error, explain last command and review diff. Each sends a ready-made prompt that starts by reading the terminal or the diff, rather than asking you a question first. Try explain last command after running something in the terminal.
Work with the reply
Hover over a reply to copy it as Markdown, retry it, or branch the conversation from that point. Right-click your own message for Edit and resend… and Replay with model….
Start a fresh conversation with New chat in the gear menu (⇧⌘N).
Every conversation is saved automatically.
Check yourself
- You approved one command and denied another, and the agent carried on.
- You stopped a turn with
⌘.. - You queued a follow-up prompt while a turn was running.
Go further
- Agent — the conversation, the composer, and reading replies
- Agent safety — every approval rule
- Next lesson: Safety and approvals