Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Markup for Agents

AprilApril34 downloads

Annotate passages in your notes and send them, with your selection, to Claude Code and Codex running in Obsidian terminals.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

Annotate passages in your notes and send them, with your comments, to Claude Code and Codex running in Obsidian terminals.

简体中文

What it does

  • Annotations. Select text, choose Add to Claude or Add to Codex, and optionally write a comment. The passage is highlighted in the note and numbered. All pending annotations ride along with your next message to that agent, together with the text you currently have selected. The terminal shows no extra text, and the annotations are dropped once the message is submitted.
  • Selection sharing. Claude Code and Codex see the active note, the selected text and the open tabs through their own IDE integrations (/ide). You do not paste anything.
  • A panel under each terminal that runs Claude Code or Codex shows what will be shared (the selection) and how many annotations are waiting. It also tells you when the agent is not connected.

Requirements

  • Obsidian 1.7.0 or later, desktop only.
  • Claude Code and/or Codex CLI.
  • The Terminal plugin, to run the agents inside Obsidian and to get the panel. Sharing the selection works from any terminal started in the vault folder.

Quick start

1. Install the Terminal plugin

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.

Terminal by polyipseity in the community plugin browser, with its Install button

2. Start an agent in a terminal

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.

3. Connect the IDE integration

  • Claude Code connects by itself when Auto-connect to IDE is enabled (/config). Otherwise type /ide.
  • Codex needs /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.

Claude Code connected: the input shows the active note and the panel under the terminal repeats it

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

Codex before /ide: the panel under the terminal says "Not connected · type /ide"

4. Select text in a note

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.

Selecting a paragraph; the agent's input and the panel show "1 line selected"

5. Add an annotation

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 Add to Claude dialog with the selected passage and a comment

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.

Two annotated passages in the note; the panel shows "2 annotations" and the message is ready to send

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

Codex with two annotated passages; the footer shows IDE context and the panel shows "2 annotations"

6. Review, jump and edit

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.

The annotation list with a trash button on each entry

7. Send

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.

8. Optional: set a hotkey

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.

Commands

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

What it touches on your machine

  • Starts a WebSocket server on 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.
  • For Codex, answers on Codex's local IPC channel (~/.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.
  • Reads the visible screen of terminals to see the agent's input and footer, and runs ps to tell which terminal runs which agent.
  • Saves images pasted into annotation comments to your attachment folder.
  • Makes no network requests. The only data that leaves Obsidian is what you hand to the agents: the selected text, open tab names, annotations and the paths of their images.

Limitations

  • The Claude Code and Codex IDE protocols are not formally documented. This plugin follows their observed behaviour and may break when they change.
  • The panel relies on the Terminal plugin's internal terminal object.
  • Windows support follows Codex's named-pipe design but has not been tested.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Annotate passages in notes, add comments, and send them to Claude Code or Codex running in Obsidian terminals. Highlight and number selections, include all pending annotations with your next message, and have them cleared when the message is submitted. View the active selection and annotation count in a panel under each terminal, and jump to or remove annotations from the list or by clicking their badge.
AnnotationAIIntegrations
Details
Current version
1.0.3
Last updated
2 weeks ago
Created
2 weeks ago
Updates
4 releases
Downloads
34
Compatible with
Obsidian 1.7.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
AprilAprilapri1qing
GitHubapri1qing
  1. Community
  2. Plugins
  3. Annotation
  4. Markup for Agents

Related plugins

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.

Snipd Official

Sync Snipd podcast highlights to your vault with transcript, notes, AI summaries and metadata.

HiNote

Add comments to highlighted notes, use AI for thinking, and flashcards for memory.

Claude Sidebar

Run Claude Code in your sidebar.

Claude Code IDE

Connect your vault to Claude Code and share editor context with the CLI.

MCP Connector

Connect MCP-compatible clients (Claude Desktop, Claude Code, Cline) to your vault with semantic search, templates, file management and gated command execution.

Admonition

Admonition block-styled content.

BRAT

Easily install a beta version of a plugin for testing.

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.