April34 downloadsAnnotate passages in your notes and send them, with your selection, to Claude Code and Codex running in Obsidian terminals.
Annotate passages in your notes and send them, with your comments, to Claude Code and Codex running in Obsidian terminals.
/ide). You do not paste anything.Markup for Agents works with the agents you run in Obsidian terminals, which the Terminal plugin provides. Install it first: open Settings → Community plugins → Browse, search for Terminal, install the one by polyipseity and enable it.

Open a terminal at the vault root: search the command palette for Terminal and pick the integrated terminal opened at the vault root. Drag its tab into the right sidebar so your note and the agent sit side by side. Run claude or codex there.
/config). Otherwise type /ide./ide once per session. Its footer shows IDE context when it is on.When the connection is up, the agent's input shows which note you are in, and the panel under the terminal repeats it.

Until then the panel says Not connected and tells you to type /ide. Codex before /ide:

Whatever you select in the editor is what the agent sees. The input and the panel show it, for example 1 line selected. There is nothing to paste.

With text selected, right-click and choose Add to Claude (or Add to Codex), or run the same command from the command palette. Write a comment and press Add annotation.
To show the agent an image, paste it into the comment. It is saved to your attachment folder, as when you paste an image into a note, and the agent opens it. Images embedded in the annotated passage reach the agent the same way.

The passage is highlighted and numbered in the note, and the panel counts the annotations waiting for that agent. Add as many as you like, in as many notes as you like. Claude annotations are orange.

Codex annotations are blue. After /ide, Codex's footer shows IDE context, and the panel shows the active note and the annotations waiting.

Click the annotation count in the panel to open the list. Click an entry to jump to that passage in its note, or use the trash button to remove it. Click a numbered badge in the note to edit or remove the annotation. Deleting the annotated text removes its annotation.

Write your message in the terminal and press Enter. All pending annotations travel with it, together with your current selection, and are cleared once the message is submitted.
No hotkeys are set by default. Open Settings → Hotkeys, search for Markup for Agents, and assign keys to Add to Claude and Add to Codex, for example Cmd+Alt+C and Cmd+Alt+X. They also work while a terminal has focus.
| Command | Action |
|---|---|
| Add to Claude / Add to Codex | Annotate the selected text |
| Mention selection in Claude | Send an @ reference to the selection to Claude Code |
| Restart Codex IDE server | Reconnect the Codex channel |
127.0.0.1 (random port, protected by a token) and writes ~/.claude/ide/<port>.lock so that Claude Code finds it. The file is removed when the plugin unloads.~/.codex/ipc/ipc.sock, or \\.\pipe\codex-ipc on Windows). If another program such as the Codex desktop app already owns that channel, the plugin joins it as a client instead of competing.ps to tell which terminal runs which agent.