In this article
The watcher turns source comments into task input; a trigger can collect other marked comments, so inspect the complete pending instruction set before saving it.
Understand the editor-to-agent bridge
Aider can watch repository files while a developer works in an ordinary editor. The IDE guide describes --watch-files looking for marked one-line comments. This is a task-input mechanism rather than an editor extension that only reads the current selection. A saved comment can enter a continuing agent conversation together with the other repository context already present there.
Distinguish collection from a trigger
Comments beginning or ending with AI are collected as instructions. AI! triggers code changes, while AI? triggers a question response. The trigger collects the marked comments rather than necessarily acting on a single isolated line. Before saving a trigger, check for other pending markers in the working files. A forgotten instruction elsewhere can widen the resulting task even when the newest comment looks narrowly scoped.
Recognize file-context effects
The guide says adding an AI comment can add that file to the chat. Removing the comment immediately does not automatically remove the file from context. This matters when switching between unrelated tasks in the same session. Use the command reference to inspect known and included files, and deliberately manage unnecessary context. Do not assume an editor undo restores every part of the agent’s conversation state.
Check the actual enabled watcher
The options reference identifies file watching as disabled by default. Confirm effective configuration when markers appear inert. The guide recognizes specific one-line comment styles rather than arbitrary prose inside any document. A literal example in documentation and a deliberately saved trigger in a watched source file are different contexts. Keep instructions explicit enough that the requested behavior and edit boundary can be reviewed before the agent acts.
Verify the task and resulting changes together
Start with a bounded harmless edit, inspect the collected instructions, and review the diff and relevant check. If using the question trigger, confirm the interaction stayed within the requested explanatory task. The task-contract guide helps write a precise marker, while tool observations distinguish detection from successful implementation. Continue in the terminal when useful, preserving awareness that the editor-triggered work has already become part of that session.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.