Aider Watch 模式Aider (Watch mode)
不是编辑器插件,是一种使用模式。
Aider 常驻 watch 你的文件,你在任意编辑器里加 AI 注释,它就响应。
Not an editor plugin but a usage mode — Aider stays resident and watches your files; add an AI comment in any editor and it responds.
适合与不适合When to use it, when not to
适合两类人,与本条目的 fit 维度一致。
- 习惯在任意编辑器里工作,不愿切换到专门的 Agent 界面的人
- 需要「加注释 → 自动响应」这种轻量交互的人
不适合要求严格审批的场景。
watch 模式默认会对某些操作询问,但仍会自动提交。
常驻进程下,它更容易产生未经确认的改动。
也不适合需要云端后台运行的场景,它依赖本机进程。
People who work in whatever editor they like and refuse to move to a dedicated agent interface. People who want lightweight interaction: add a comment, get a response.
Not a fit for scenarios requiring strict approval — the confirmation mechanism in watch mode was not verified this round, and a resident process makes unconfirmed changes more likely. Also not a fit for cloud background execution; it depends on a local process.
中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-10-20
- 出品属地Origin
- 国外出品foreign-made 国外主体(网信办公示名单未见对应备案主体)。foreign entity (no matching filing entity in the CAC registry).
- 国内使用Direct access
- 大陆可直连direct OK 官网 aider.chat 直连实测 200。aider.chat measured 200 direct.
- 备案状态CAC filing
- 未见于备案名单not in filing list:未见于网信办公示名单(2026-10-20 检索 13 批附件,https://www.cac.gov.cn/2024-04/02/c_1713729983803145.htm);该产品未面向大陆公众提供服务,备案不适用。not in the CAC public registry (13 batch attachments searched 2026-10-20, https://www.cac.gov.cn/2024-04/02/c_1713729983803145.htm); the product does not serve the mainland public, so filing does not apply.
备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
固定坐标系Fixed coordinate system
8 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.
- 模型与开放条件Model & openness
与 CLI 形态同一套模型入口:支持云端与本地 LLM,可连接几乎任何模型。
README 当前推荐列表停留在上一代模型 (Claude 3.7 Sonnet / DeepSeek R1 / OpenAI o1 等)。
该 README 的状态与该项目的 release 状态一致。
这个项目 13 个月未发 release。
所以参考这份列表时要自行核对。
Same model entry point as the CLI form: supports cloud and local LLMs, and can connect to almost any model.
The README's current recommended list is stuck on the previous generation of models (Claude 3.7 Sonnet / DeepSeek R1 / OpenAI o1, etc.).
The state of that README matches the project's release state.
This project has not shipped a release in 13 months.
So verify this list yourself when using it as a reference.
- 运行位置Where it runs
它的形态是后台常驻进程,不装进编辑器。
Aider 在后台 watch 你的文件。
你在任意 IDE 或文本编辑器里加 AI 注释,它就响应。
官方文档标题即为「Aider in your IDE」。
但实现上跑的是 Aider 自己的浏览器 UI。
这与 Cline / Codex 的「编辑器扩展」是不同的形态。
It is not an editor plugin; it is a usage mode.
Aider watches your files in the background.
You add AI comments in any IDE or text editor, and it responds.
The official docs page is literally titled "Aider in your IDE".
But the implementation runs Aider's own browser UI.
This is a different form factor from the "editor extension" approach of Cline / Codex.
- 本地文件Local files
watch 模式监听 git 仓库内所有文件的变化并响应 AI 注释。
官方原文:"watch all files in your repo"
(出自官方
docs/usage/watch.html的--watch-files。)范围受
.gitignore/.aiderignore约束。--aiderignore指定忽略文件,默认 git 根目录的.aiderignore--subtree-only只考虑当前子树
仓库须是 git 仓库。官方
docs/git.html写:无 git 时会先问你是否新建。核心的 Repo Map 能力与 CLI 形态完全相同——同一项目的同一机制, 官方文档见
docs/repomap.md。它用「一份简洁的整个 git 仓库的地图」提供上下文。
这份地图含最重要的类与函数及其类型与调用签名。
每次改动请求都随附该 map。
它的第二个作用在 watch 模式下尤其有用: 帮助写新代码时复用代码库里已有的库、模块与抽象。
支持 100+ 编程语言。
map 的 token 预算由
--map-tokens控制。刷新频率由
--map-refresh控制,取值为 auto/always/files/manual。大仓库的实际耗时与 token 开销,官方未给数字,本站未做端到端实测。
Watch mode monitors changes to all files inside the git repository and responds to AI comments.
Official wording: "watch all files in your repo"
(from
--watch-filesin the officialdocs/usage/watch.html.)Scope is constrained by
.gitignore/.aiderignore.--aiderignorespecifies the ignore file; defaults to.aiderignoreat the git root--subtree-onlyconsiders only the current subtree
The repository must be a git repository. The official
docs/git.htmlstates: without git, it first asks whether to create one.The core Repo Map capability is exactly the same as in the CLI form — the same mechanism of the same project; official docs at
docs/repomap.md.It provides context via "a concise map of your whole git repository".
This map contains the most important classes and functions along with their types and call signatures.
The map is attached to every change request.
Its second purpose is especially useful in watch mode: when writing new code, it helps reuse libraries, modules and abstractions already in the codebase.
Supports 100+ programming languages.
The map's token budget is controlled by
--map-tokens.Refresh frequency is controlled by
--map-refresh, with values auto/always/files/manual.Actual time and token cost on large repos: the official docs give no numbers, and this site has not run measurements.
- 关机后的任务Tasks after shutdown
需要 Aider 进程常驻才能响应注释——这与「后台云端任务」不是一回事。
进程关闭后 watch 即失效。
也不存在客户端关闭后继续运行的云端形态。
The Aider process must stay resident to respond to comments — this is not the same thing as "background cloud tasks".
When the process exits, watch stops.
There is also no cloud form that keeps running after the client closes.
- 工具与扩展Tools & extensions
两大核心能力是文件编辑与 Git 自动提交,与 CLI 形态是同一机制。
可配置 lint / 测试命令自动运行。
官方文档见
docs/usage/lint-test.html。--lint-cmd/--auto-lint:默认对编辑过的文件跑 lint--test-cmd/--auto-test/run:跑 shell 命令/web:抓网页转 markdown/paste:贴图
watch 模式下,可从编辑器直接拖文件到智能体面板,或把编辑器选区发送到对话。
在文件里加
# AI注释,即可把该文件加入 chat。无内置 MCP 支持——官方选项表与文档站导航都没有任何 MCP 条目 (已查
config/options.html与 docs 目录)。所以不能接 MCP server。
The two core capabilities are file editing and Git auto-commit, the same mechanisms as in the CLI form.
Lint / test commands can be configured to run automatically.
Official docs at
docs/usage/lint-test.html.--lint-cmd/--auto-lint: by default run lint on edited files--test-cmd/--auto-test/run: run a shell command/web: fetch a web page and convert it to markdown/paste: paste an image
In watch mode, you can drag files from the editor into the agent panel, or send the editor selection to the chat.
Adding a
# AIcomment in a file adds that file to the chat.No built-in MCP support — neither the official options table nor the docs-site navigation has any MCP entry (checked
config/options.htmland the docs directory).So you cannot connect MCP servers.
- 上下文与记忆Context & memory
Repo Map 提供全库结构视图,每次请求随附,见 local_files。
上下文超限用「摘要压缩」而非简单截断。
官方选项
--max-chat-history-tokens的描述是:官方原文:"Soft limit on tokens for chat history, after which summarization begins"
也就是说,超过软上限即开始摘要;摘要由
--weak-model生成。--map-tokens控 repo map 的 token 预算。每个模型的上下文窗口与费用,由
--model-metadata-file提供。会话内可用
/tokens查看用量。腾空间还有
/drop、/clear、/reset。默认不跨启动恢复(
--restore-chat-history默认 False)。chat 历史默认写
.aider.chat.history.md。Repo Map provides a whole-repo structural view, attached to every request; see local_files.
Context overflow is handled by "summarization compression" rather than simple truncation.
The official option
--max-chat-history-tokensis described as:Official wording: "Soft limit on tokens for chat history, after which summarization begins"
That is, summarization begins once the soft limit is exceeded; summaries are generated by
--weak-model.--map-tokenscontrols the repo map's token budget.Each model's context window and cost come from
--model-metadata-file.Within a session,
/tokensshows usage.To free space there are also
/drop,/clear,/reset.No cross-launch restoration by default (
--restore-chat-historydefaults to False).Chat history is written to
.aider.chat.history.mdby default.- 权限与限制Permissions & limits
默认自动提交。
官方
--auto-commits默认 True:每次编辑都用合理的 commit message 提交。--dirty-commits默认 True:会先把已有的未提交改动也提交, 让你的改动与 AI 的改动分开。撤销路径是 git 本身(
/undo)。存在确认环节。
官方提供
--yes-always(别名--yes)。官方原文:"Always say yes to every confirmation"
含义是:默认会对某些操作询问,加此开关才全自动。
--dry-run可不改文件地预演。提交时默认跳过 pre-commit hook(
--git-commit-verify默认 False,即用--no-verify)。无沙箱机制(官方选项表无任何沙箱项)。
watch 模式复用同一 coder。
官方 watch 页写它用
/undo撤销、用/tokens管上下文。所以上述自动提交与确认机制同样适用。
常驻进程 + 自动提交 + 需显式开关才不询问,三者叠加风险高。
Auto-commit is on by default.
The official
--auto-commitsdefaults to True: every edit is committed with a sensible commit message.--dirty-commitsdefaults to True: existing uncommitted changes are committed first, separating your changes from AI changes.The undo path is git itself (
/undo).A confirmation step exists.
The official docs provide
--yes-always(alias--yes).Official wording: "Always say yes to every confirmation"
Meaning: by default it asks about certain operations; only with this flag does it go fully automatic.
--dry-runpreviews without changing files.Commits skip pre-commit hooks by default (
--git-commit-verifydefaults to False, i.e. it uses--no-verify).No sandboxing mechanism (the official options table has no sandbox entry).
Watch mode reuses the same coder.
The official watch page says it uses
/undoto revert and/tokensto manage context.So the auto-commit and confirmation mechanics above apply equally.
The combination of a resident process + auto-commit + explicit flags needed to avoid asking is high-risk.
- 适合什么任务Best for
适合两类人:
- 习惯在任意编辑器里工作,不愿切换到专门的 Agent 界面的人
- 需要「加注释 → 自动响应」这种轻量交互的人
Fits two kinds of people:
- those who work comfortably in any editor and don't want to switch to a dedicated agent UI
- those who want the lightweight "add a comment → automatic response" interaction
头号误解Top misconception
- 以为它是编辑器插件,实际是 Aider 常驻进程 + 浏览器 UIAssuming it is an editor plugin — it is a resident Aider process plus a browser UI
- 把 watch 模式当成云端后台任务,它需要本机进程一直运行Treating watch mode as a cloud background job — it needs a local process running the whole time
- 没意识到自动提交在 watch 模式下同样生效,常驻进程下风险更高Not realising auto-commit applies in watch mode too, which makes it riskier under a resident process
未知项清单Known unknowns
- 大仓库 Repo Map 的实际耗时与 token 开销(官方未给数字,待实测)
--yes-always默认会就哪些具体操作询问(官方未逐项列举)
- Actual time and token cost of Repo Map on large repos (official gives no numbers; pending measurement)
- Which specific operations it asks to confirm by default (
--yes-alwaysexists, but the official docs do not enumerate the confirmations item by item)
证据来源Evidence sources
判断可回到以下一手源复核。本站核验日Every judgement can be rechecked against the primary sources below. Verified on 2026-10-23,内容更新日content updated on 2026-10-08。
| 类型Type | 名称Name | 链接Link |
|---|---|---|
| docs | Aider · Watch 模式官方文档(Aider in your IDE)Aider · official Watch-mode docs (Aider in your IDE) | https://aider.chat/docs/usage/watch.html |
| repo | Aider · 仓库Aider · repository | https://github.com/Aider-AI/aider |
| changelog | Aider · Releases(最新 v0.86.0 @ 2025-08-09)Aider · Releases (latest v0.86.0 @ 2025-08-09) | https://github.com/Aider-AI/aider/releases |
| docs | Aider · 选项参考(--aiderignore/--auto-commits/--yes-always/--map-tokens/--max-chat-history-tokens)Aider · options reference (--aiderignore/--auto-commits/--yes-always/--map-tokens/--max-chat-history-tokens) | https://aider.chat/docs/config/options.html |
| docs | Aider · Git 集成(自动提交、dirty 提交、/undo、默认跳过 pre-commit hook)Aider · Git integration (auto-commit, dirty commits, /undo, pre-commit hooks skipped by default) | https://aider.chat/docs/git.html |
| docs | Aider · Linting and testing(--lint-cmd/--test-cmd/--auto-lint/--auto-test)Aider · Linting and testing (--lint-cmd/--test-cmd/--auto-lint/--auto-test) | https://aider.chat/docs/usage/lint-test.html |
| docs | Aider · Scripting(--yes/--auto-commits/--dry-run 官方帮助文本)Aider · Scripting (official help text for --yes/--auto-commits/--dry-run) | https://aider.chat/docs/scripting.html |
实测记录Measured runs
本档未跑端到端编码任务;能力结论来自官方文档,编码向测量协议见 protocols/coding/_protocol.md。
实测建议:这个工具的实测重点应是 「常驻进程 + 自动提交」的风险是否可控。
建议在一个测试仓库里跑,观察产生了多少次未经确认的提交。
This site has not completed measured runs. The test protocol is at protocols/coding/_protocol.md.
Suggested measurement: for this tool the focus should be whether the "resident process + auto-commit" risk is controllable.
Run it in a test repository and observe how many unconfirmed commits it produces.
它在 IDE 形态里的位置Where it sits among IDE forms
IDE 形态到目前为止有四种,本条目是第四种:
| 形态 | 代表 | 实质 |
|---|---|---|
| 独立编辑器 | Zed | 自带完整编辑器 |
| 原生桌面应用 | Cline Desktop | 不依附编辑器 |
| 编辑器扩展 | Codex IDE、Copilot、Cline 扩展 | 装进已有编辑器 |
| 常驻 watch 模式 | Aider | 在编辑器外运行,监听文件变化 |
Aider 的特殊之处:它不进入编辑器,而是监听你在任意编辑器里的改动。
官方文档的措辞
官方文档的标题是「Aider in your IDE」。
英文原文:
Aider can watch your files and respond to AI comments
you add in your favorite IDE or text editor.
注意最后半句:or text editor。
连纯文本编辑器都行,因为它监听的是文件变化,不是编辑器 API。
但界面仍是 Aider 自己的浏览器 UI,不是在编辑器内联显示。
The IDE form has four variants so far, and this entry is the fourth:
| Form | Representative | Essence |
|---|---|---|
| Standalone editor | Zed | ships a full editor |
| Native desktop app | Cline Desktop | does not attach to an editor |
| Editor extension | Codex IDE, Copilot, Cline extension | installed into an existing editor |
| Resident watch mode | Aider | runs outside the editor, watching file changes |
What makes Aider special: it does not enter the editor; it watches the changes you make in whatever editor you use.
The official docs' wording
The official docs page is titled "Aider in your IDE".
The English original:
Aider can watch your files and respond to AI comments
you add in your favorite IDE or text editor.
Note the last half-sentence: or text editor.
Even a plain text editor works, because it watches file changes, not editor APIs.
But the interface is still Aider's own browser UI, not an in-editor inline display.
与 CLI 形态的关系Relationship to the CLI form
| CLI | Watch 模式(本条目) | |
|---|---|---|
| 交互 | 终端对话 | 加 AI 注释 |
| 界面 | 终端 | Aider 的浏览器 UI |
| 进程 | 随会话结束 | 需常驻 |
| Repo Map | 有 | 有(同一能力) |
| 自动提交 | 有 | 有(同一机制) |
| 维护状态 | maintenance | maintenance(同一项目) |
同一个项目,两种用法,不是两套实现。
| CLI | Watch mode (this entry) | |
|---|---|---|
| Interaction | terminal chat | add AI comments |
| Interface | terminal | Aider's browser UI |
| Process | ends with the session | must stay resident |
| Repo Map | yes | yes (same capability) |
| Auto-commit | yes | yes (same mechanism) |
| Maintenance status | maintenance | maintenance (same project) |
One project, two usage modes — not two implementations.
关键风险:常驻 + 自动提交Key risk: resident process + auto-commit
本条目需要特别注意的组合有三个因素。
| 因素 | 状态 |
|---|---|
| 进程常驻 | 需要一直运行才能响应 |
| 自动提交 | AI 改动直接进 git 历史(--auto-commits 默认 True) |
| 每次询问 | 有确认开关 --yes-always(默认关) |
| 默认会对某些操作询问 |
三者叠加,风险高于手动启动的 CLI 用法。
这三者是:常驻进程、默认自动提交、需显式 --dry-run 或关自动提交才可预演。
建议:第一次用 watch 模式时,在小仓库里试,并先确认 git 状态干净。
This entry needs special attention to a combination of three factors.
| Factor | Status |
|---|---|
| Resident process | must keep running to respond |
| Auto-commit | AI changes go straight into git history (--auto-commits defaults to True) |
| Ask each time | there is a confirmation flag --yes-always (off by default) |
| it asks about certain operations by default |
All three combined, the risk is higher than the manually launched CLI usage.
The three are: resident process, auto-commit by default, and needing an explicit --dry-run or disabled auto-commit to preview.
Advice: when first using watch mode, try it in a small repository and make sure git status is clean first.
采集限制Collection limits
Aider 的文档站在本次采集环境 curl 可达。
watch 模式的官方描述已确认。
2026-10-08 补充核验:
- watch 模式的文件范围与忽略规则
- 自动提交与
--yes-always确认机制 - lint / 测试命令
- 上下文摘要压缩(
--max-chat-history-tokens) - 官方文档与选项表均无 MCP 条目这一结论
以上均已从官方源核实并写进 axes。
仍待实测:大仓库 Repo Map 的实际耗时与 token 开销(官方未给数字)。
Aider's docs site was reachable via curl in this collection environment.
The official description of watch mode has been confirmed.
2026-10-08 (2026-10-08) check filled in:
- watch mode's file scope and ignore rules
- auto-commit and the
--yes-alwaysconfirmation mechanism - lint / test commands
- context summarization compression (
--max-chat-history-tokens) - the conclusion that neither the official docs nor the options table has any MCP entry
All of the above have been verified against official sources and written into the axes.
Still pending measurement: actual time and token cost of Repo Map on large repos (official gives no numbers).
相关条目Related entries
- Aider CLIAider同一项目的终端形态the terminal form of the same project
- ClineCline三形态覆盖,但形态相互独立covers three form factors, but the forms are independent of each other
- Git MCP ServerGit MCP Server另一层 · MCP 工具Other layer · MCP tools
本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0).
方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.