3.2 KiB
3.2 KiB
name, description, version, author, license, platforms, metadata
| name | description | version | author | license | platforms | metadata | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ai-coding-agents | Delegate coding to external AI CLI agents (Claude Code, Codex, OpenCode). Shared orchestration patterns, tool selection, PTY handling. | 1.0.0 | Hermes Agent | MIT |
|
|
AI Coding Agents — Orchestration Guide
Delegate coding tasks to external autonomous coding agent CLIs via the Hermes terminal. All three tools follow the same orchestration patterns; pick based on what's installed and the user's preference.
Tool Selection
| Tool | Provider | Install | Best For |
|---|---|---|---|
| Claude Code | Anthropic | npm install -g @anthropic-ai/claude-code |
Complex multi-file refactoring, deep reasoning, MCP integration |
| Codex | OpenAI | npm install -g @openai/codex |
Fast feature implementation, batch issue fixing |
| OpenCode | Multi-provider | npm i -g opencode-ai@latest |
Provider-agnostic work, cost optimization |
Shared Orchestration Patterns
One-Shot (Preferred for most tasks)
All three tools support non-interactive one-shot execution — the cleanest integration:
# Claude Code
claude -p 'Add error handling to all API calls in src/' --allowedTools 'Read,Edit' --max-turns 10
# Codex
codex exec 'Add dark mode toggle to settings'
# OpenCode
opencode run 'Add retry logic to API calls and update tests'
Interactive / Background (Multi-turn sessions)
For iterative work, run in background with PTY:
# All tools require pty=true for interactive mode
terminal(command="<tool> ...", workdir="~/project", background=true, pty=true)
# Monitor with process(action="poll"|"log")
# Send input with process(action="submit", data="...")
PR Review
# Claude Code
claude -p 'Review this PR thoroughly' --from-pr 42 --max-turns 10
# Codex
codex exec 'Review PR #42. git diff origin/main...origin/pr/42'
# OpenCode
opencode pr 42
Parallel Tasks
All three support running multiple instances in separate workdirs/worktrees:
terminal(command="<tool> 'Fix issue #78'", workdir="/tmp/issue-78", background=true, pty=true)
terminal(command="<tool> 'Fix issue #99'", workdir="/tmp/issue-99", background=true, pty=true)
Critical Rules
- Always use
workdir— scope the agent to the right project - Set turn limits for one-shot mode (prevents runaway loops)
- Use
pty=truefor interactive sessions — all three are TUI apps - Monitor progress with
process(action="poll"|"log")— don't kill slow sessions - Git repo required — all three need a git directory. Use
mktemp -d && git initfor scratch work - Clean up background sessions when done
Tool-Specific References
Detailed CLI flags, session management, and advanced features for each tool:
references/claude-code.md— Claude Code: print mode deep dive, tmux orchestration, hooks, MCP, subagents, settings hierarchyreferences/codex.md— Codex: exec flags, full-auto vs yolo, worktree patterns, auth (OAuth vs API key)references/opencode.md— OpenCode: run vs interactive TUI, session resumption, provider selection, PR review