Codumentor logo Codumentor

External Agent Plugin

The External Agent plugin lets the main agent delegate work to external coding-agent CLIs — Claude Code, Codex, OpenCode, Gemini — or to a peer Codumentor instance, each running unattended in a sandbox. Every configured backend becomes its own tool (claude_code, codex, …) that takes a task description and returns the external agent's result, with its live transcript shown in a UI card.

Configuration

plugins:
  - module: codumentor.plugins.external_agent
    class: ExternalAgentPlugin
    args:
      enabled: true
      default_sandbox_tier: 0      # 0 = bare subprocess, 1 = bwrap overlay
      target_agents: "main"
      backends:
        claude-code:
          binary: claude
          mode: technical_user     # see "Auth modes" below
          # api_key omitted → use the Claude CLI's own auth store in $HOME
        codex:
          binary: codex
          mode: technical_user

Parameters

Auth modes

Tool Reference

One tool is registered per configured backend:

ToolBackend
claude_codeAnthropic Claude Code CLI
codexOpenAI Codex CLI
opencodeOpenCode CLI
geminiGoogle Gemini CLI (no session resume)
codumentorA peer Codumentor instance over HTTP (base_url)

Each tool takes a query (the task) and an optional subagent_id to resume a previous session with that backend.

Notes