Skip to main content
You can leave notes for the agent inside the document itself. Wrap them in any of these delimiters:
  • [[ ... ]]
  • (( ... ))
  • << ... >>
Pick whichever doesn’t collide with the syntax of what you’re writing (LaTeX uses [[ ]] for some macros, for example, so (( )) works better there). The agent recognizes all three.
A document with inline [[ ... ]] directives left for the agent
You keep writing. The agent auto-wakes three seconds after you stop typing (see Auto-wake on idle), reads the open tabs, pulls out every [[ ... ]] it finds, treats each one as a task in a queue, and handles them (proposing edits, posting comments, or running tools as appropriate). When it acts on a directive, it deletes the directive text from the document so the prose closes back up. If you don’t want to wait the three seconds, Cmd/Ctrl+Enter in the editor triggers the same wake-up immediately. Clicking the agent pill at the top of the history pane does the same.

Why this exists

Talking to the agent through the chat popover is great when you have a clear, immediate request. But the requests that actually come up while writing are often local and contingent: “fact-check this,” “I’m not sure about this transition,” “rewrite this once I figure out the rest of the section.” Stopping to type those into a chat box pulls you out of the flow. Directives are a way to write the request where the request applies (in the document, at the spot it matters), and pick it up later, in batch.

How they’re handled

The agent’s behavior depends on the autonomy level:
  • Conservative. The agent only edits when a directive is present or the user has made a specific request. Directives are the main way to get edits at this level.
  • Balanced. Directives are handled first; the agent may also pick up obvious problems in the prose.
  • Aggressive. Directives are still handled, but the agent is also proactive about improvements you didn’t write a directive for.
If the agent can’t handle a directive (it asks for a tool you don’t have, or for information it can’t get), it leaves a comment explaining what it would need, instead of silently failing.

A few patterns

You can chain them. The agent works through the active tab’s directives first, then any directives on other open tabs.

Use them with hooks

Because handling a directive counts as an Edit tool call, your hooks fire. If you have pdflatex wired up, the PDF rebuilds. If you have an auto-commit hook on Stop, the change pushes to git when the agent finishes the turn. The practical workflow: write your draft with directives sprinkled through it, walk away, come back, wake the agent, and watch a batch of small concrete changes land, each one already built and committed by the time you start reviewing.