Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 2.17 KB

File metadata and controls

75 lines (46 loc) · 2.17 KB

Agent Comments Setup

Agent Comments works with local command-line agents. Pick a preset in settings, run the health checks, then adjust the commands if your local CLI differs.

Codex

Background reply agent:

codex exec

Terminal agent:

codex

Use this when you want Codex to reply in comment threads or write CriticMarkup back into the Markdown file.

Claude

Background reply agent:

claude -p --permission-mode acceptEdits

Terminal agent:

claude

--permission-mode acceptEdits lets headless claude -p write CriticMarkup back to the file. Without it, Claude runs with normal permissions, can't apply edits non-interactively, and will report that it couldn't write instead of replying. If your Claude CLI uses different flags for stdin/non-interactive mode, update Reply extra args and run the background health check.

OpenCode

Background reply agent:

opencode run

Terminal agent:

opencode

OpenCode CLI behavior may vary by version. Use the preset as a starting point and run the health checks.

Custom Agents

Any command can work if it can:

  • read the prompt from stdin
  • write a response to stdout, or edit the Markdown file directly
  • run from the vault root

For comment replies, the command should either append {>>AgentName: reply<<} to the target thread or print a concise reply that Agent Comments can append.

Headless write permissions

Agents differ in whether their non-interactive mode can edit files:

  • Codex (codex exec) writes to the file directly.
  • Claude (claude -p) needs --permission-mode acceptEdits to write; otherwise it falls back to printing a reply.
  • OpenCode and others vary — check your CLI's headless/permission flags.

If an agent can't write, Agent Comments still appends its stdout as the reply. Granting write permission lets the agent apply CriticMarkup edits in place.

PATH note

Obsidian launched from the GUI inherits a minimal PATH. Agent Comments augments it with common locations (~/.local/bin, /opt/homebrew/bin, /usr/local/bin, …). If your agent binary lives elsewhere, set the Reply command / Terminal launch command to an absolute path.