by IvyYang1999
Feishu-style inline comments stored right in your Markdown. Highlight text, leave a note, @ an AI coding session to reply.
Agent Comments
Comments alongside your notes. @ an agent to reply.
Works on its own; stored as plain text in the Markdown.
Install in Obsidian · Website · 中文说明 ↓
What it does
Highlight → comment. Select text, right-click Add inline comment. A card appears in the right sidebar, level with the passage, and follows it as you scroll. The note itself only gets a soft highlight and a small counter.
@ a real session. Type @ in a comment to pick a running Claude Code / Codex session on your machine — or choose Answer with a new session and the plugin starts one with whichever agent CLI you have installed: Claude Code opens in Terminal (macOS), Codex and Gemini CLI answer in the background, each comment resuming the same session. If the Claude Code session is open right now — in the Claude app's Code tab or in a terminal — the letter goes straight into it, queued after whatever it is doing; otherwise it waits in the session's mailbox and a small hook (installed on request) hands it over the next time the session speaks. A session that skips permission prompts holds messages from other programs at its door; switch it to another permission mode within five minutes (no restart needed) and the comment goes straight in. The session reads the note and writes its reply back into the file.
Know where a comment stands. The @ list says how each member gets a comment right now — straight away, the next time it speaks, or not at all, with a one-click fix (install the hook, sign the CLI in). Under each @ the card shows where the comment is: in the mailbox, handed to the session and being worked on, or not delivered and why, with Retry. Once the reply arrives the line shrinks to a quiet note of how it got there, and if the reply lands on a card you can't see, a … replied ↓ button at the bottom of the panel takes you to it.
Suggested edits. A reply can carry a replacement for the highlighted passage — from a person or from the AI session. The card shows old → new with Accept / Decline; nothing in the note changes until you accept.
Unread, at a glance. Replies from other people or AI get a red dot, the panel header shows N comments · M unread, and the file explorer shows a red count on the document. Mark as read with one click, resolve a thread when it's done, react with an emoji. One switch turns the unread signals off.
Many comments, still readable. Cards stay fully open and stack down the margin; a long thread shows its first comment and the latest reply, with the ones between a click away. Click a card and the note scrolls so its passage sits level with it; click a passage and its card moves level with the text. Fold a card you don't need open to a single line (it opens while you're on it), or hide it from the panel until you click its passage again.
Editing and reading view, desktop and mobile. The same highlight and badge appear in reading view, with the raw markup hidden. Long threads fold to a preview until you expand or focus them.
Plain text storage. A comment is one line of CriticMarkup-style text next to the passage:
{==retention dropped 18% in week two==}{>>yyt|2026-09-05|question: Which table is this from? [@Session1](agent:3f9a12c0)<<}
No database, no sidecar files. It syncs with iCloud / Git / Obsidian Sync like any other text, diffs cleanly, and stays readable without the plugin.
Install
Obsidian → Settings → Community plugins → Browse → search Agent Comments. Or open obsidian://show-plugin?id=inline-comments.
Pre-release builds: BRAT → Add a beta plugin → IvyYang1999/obsidian-inline-comments.
Obsidian 1.8+, desktop and mobile. Session discovery, the hook, and Answer with a new session are desktop features. On macOS the plugin opens Terminal itself. On Linux and Windows, where it can't open a terminal, a Claude Code member it created answers in the background (claude -p, allowed to edit files only, like Codex), and buttons that would open a terminal copy the command for you to paste instead. If you start a session yourself in a new folder, accept Claude Code's folder-trust prompt, and don't run it in a permission mode that blocks file edits, or it can't write its reply into the note.
Using @
- Manage members (from the
@dropdown or the settings tab) lists the Claude Code / Codex sessions running on this machine. Give one a name to make it mentionable — or just@a name that doesn't exist yet and the plugin creates the session for you. - Install hook, once. It adds three entries (
UserPromptSubmit,Stop,SessionStart) to~/.claude/settings.json, backs the file up first, touches nothing else, and Uninstall removes exactly those entries. - Write
@Namein a comment and send. The letter lands in<vault>/<mailbox root>/<session-id-prefix>/. A Claude Code session that is open gets it right away, unless it skips permission prompts (then switch its mode, or wait for the hook). Otherwise the session sees it the next time it speaks or finishes. Either way it reads the note and appends a reply.
The plugin never talks to the network. Letters and replies are local files in your vault; handing a letter to an open Claude Code session goes through that session's local inbox socket, the one Claude Code sessions use to message each other. What your AI tool does with the letter is up to that tool.
The UI follows Obsidian's language (English or 中文); you can pin either in settings.
Settings
| Setting | What it does |
|---|---|
| Author name | Signs your comments; your own replies never count as unread |
| Unread notifications | Master switch for red dots, Mark as read, the header count and the explorer badge |
| Show resolved | Keep resolved threads in the panel (collapsed) or hide them |
| Mention delivery / mailbox root | Where letters are written |
| Panel background | Follow sidebar, follow editor, or a custom colour |
| Comment types | Built-in agree / disagree / question / important / note, plus your own with a colour |
Development
npm install --legacy-peer-deps
npm run build # tsc + esbuild → main.js
npm test # vitest, pure functions
npm run e2e # boots an isolated Obsidian and runs ~70 UI assertions
Design notes live in DESIGN.md. Releases are built by CI from a version tag and ship with build-provenance attestations.
中文
Agent Comments——在 Obsidian 笔记的原文旁边留言(划线评论),@ 一个 Agent 来回复。评论以纯文本形式紧挨着原文存在 .md 里,不联网、不建库。
- 划线,即评论。 选中文字右键「添加划线评论」,卡片挂在右侧栏、与原文水平对齐、跟着滚动。
- @ 一个正在跑的会话。 打
@点名本机的 Claude Code / Codex 会话,或「用新会话回答」让插件用本机装了的 Agent 替你开一个(Claude Code 在终端里打开;Codex、Gemini CLI 在后台回复,每条留言接着同一个会话)。Claude Code 会话此刻开着(Claude 客户端的 Code 页或终端里)时,留言直接送进去,排在它手头的事后面;没开着、或它跳过了权限确认(这时 Claude Code 不收其他程序发来的消息),就留在信箱,等它下次说话时由 hook 递过去。它读完文档把回复写回原位。 - 信到没到,一眼知道。 @ 列表里每个成员都写明它现在怎么收到:马上收到、下次说话时看到,还是收不到(附一键修复:装 hook、去登录)。每条 @ 下面有一行状态:在信箱里、已送进会话正在处理、没送到和原因(可以重试);对方回复后,这行缩成一行淡淡的「已回复 · 几点送进会话」。回复落在看不见的卡片上时,面板底部会出现「某某 回复了 ↓」,点一下就到。跳过权限确认的会话收不到直送,信会在门口等 5 分钟:这期间把它换个权限模式(不用重开)就直接送进去。
- 修改建议。 回复可以附带对划线原文的替换文本(人或 AI 都能提),卡片上显示 原文 → 改法,点「采纳」原文才会变。
- 未读一眼看清。 别人或 AI 的回复带红点,面板顶部常驻「N 条评论 · M 未读」,文件目录里对应文档也挂红色角标;看完点「标为已读」,聊完点「解决」,也可以加个 emoji 反应。设置里「未读通知」一键关掉。
- 评论再多也看得清。 卡片全部展开、竖着往下排,长的评论串只显示第一条和最新一条,中间的点一下就展开;点卡片,正文滚过来和它对齐;点正文里的划线,卡片移过去和它对齐。暂时不用看的卡片可以折叠成一行(选中时会展开),也可以隐藏,直到再点它在正文里的划线。
- 编辑与阅读视图、桌面与手机。 阅读视图里同款高亮 + 角标,原始标记隐藏;超长线程折叠成预览。
安装:Obsidian 设置 → 第三方插件 → 浏览,搜 Agent Comments;或直接打开 obsidian://show-plugin?id=inline-comments。Obsidian 1.8 以上,桌面与手机;会话发现、hook、「用新会话回答」是桌面能力;macOS 上插件直接打开终端;Linux 和 Windows 上插件开不了终端,它新建的 Claude Code 成员在后台回复(claude -p,和 Codex 一样只许改文件),要开终端的按钮改成把命令复制给你、粘到终端里运行。自己在新文件夹里启动会话时,要先在 Claude Code 里点「信任」这个文件夹,权限模式也不能挡住改文件,否则它没法把回复写进笔记。预发布版用 BRAT 添加 IvyYang1999/obsidian-inline-comments。
官网中文版:https://agent-comments.yytyyf.com
关于隐私:插件本身不联网。@ 只是往你电脑上的一个文件夹写一个文件,会话在你自己的电脑上跑;送进开着的 Claude Code 会话,走的是那个会话的本机收信口(Claude Code 会话之间互发消息用的同一个);首次 @ 需要在「管理成员」里点一次「安装 hook」——它只往 ~/.claude/settings.json 加三条,可一键卸载。
作者 yytyyf · MIT
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.