Examples
These are the kinds of prompts that benefit from the agent’s wider tool access:- “Read every chapter in
manuscript/and produce a one-line summary of each intooutline.md.” A loop over many files, writing into a separate one. - “Find every passive-voice sentence in
essay.mdand propose active-voice rewrites.” Multiple edits in one file, each surfaced as its own pending review. - “Compile
main.tex. If pdflatex errors, fix the source and rebuild. Continue until the build succeeds.” Shell execution plus iteration. - “Look at the references in
paper.biband check that each one has a DOI. Add any missing DOIs by searching the web.” Web-search tool plus file edits. - “Convert every Markdown heading in
notes/from H2 to H3.” Bulk mechanical edits across files.
How long-running work looks in the UI
When you submit a long task, the history pane on the right streams every step the agent takes: each file it reads, each edit it proposes, each shell command, each error. You can watch progress without staying glued to a particular spot. If the task produces several edits, each one shows up as a separate pending review card in the right pane. Accept or reject them in order.Keep writing while it runs
Long tasks do not block you. The agent works as a concurrent editor: you can continue editing any open file while the agent reads or writes others. When the agent’s edit lands in a file you have been typing in, your concurrent typing is preserved.Stopping a long task
Click the agent pill at the top of the history pane to stop the current turn. Any pending reviews already produced remain in the outline pane; you can accept or reject them. Subsequent tool calls do not run.Sub-agents
For tasks that need parallelism or isolation, the agent can spawn sub-agents via the SDK’sAgent tool. Each sub-agent runs its own
agent loop with its own context. In the history pane, sub-agent work
appears nested under a parent card; the SubagentStop hook fires when
one finishes (see Hook events). You do not usually
need to ask for sub-agents explicitly. The agent decides to use them
when the work parallelizes naturally. See the SDK’s
sub-agent docs
for details on configuration and isolation semantics.
When not to delegate
Long tasks rely on the agent making many decisions without your input. If you want to make those decisions yourself, prefer shorter steering: ask for one thing at a time, review, and move on. The interface is built for fast back-and-forth, so cheap iteration is often better than handing over a complex multi-step job.Where to go next
- Steering the agent. For short, conversational tasks.
- Comments. When the agent should give feedback without editing.
- Hooks. To fire build commands after agent work lands.