Coding AgentsNEW
Delegate coding tasks to Claude Code, OpenAI Codex, or GitHub Copilot CLIs from inside Sophon.
Sophon can hand a real development task off to an external coding-agent CLI and let it work autonomously — read and write files, run shell commands, and make multi-step code changes — then report back what it did. Three tools wrap three CLIs:
| Tool | Underlying CLI | Auth |
|---|---|---|
coding.claude_code | Anthropic Claude Code (claude) | CLI-owned claude auth login (preferred), dashboard OAuth, or an sk-ant-… API key |
coding.codex | OpenAI Codex (codex) | CLI-owned codex login / codex login --device-auth, dashboard OAuth, or an sk-… API key |
coding.copilot | GitHub Copilot CLI (@github/copilot-cli) | GitHub device flow, a personal access token (ghp_* / github_pat_*), or synced from the host's gh CLI |
All three are agent-callable: when the orchestrator prompt enumerates the available coding agents, the model can pick whichever fits the task.
How delegation works
Each tool takes the same core shape — a task describing the work and an absolute workingDirectory where the agent should operate:
{
"task": "Add retry-with-backoff to the HTTP client and write unit tests for it.",
"workingDirectory": "/workspace/my-service"
}Optional parameters let you tune the run:
model— override the configured default (e.g.opus/sonnetfor Claude Code,gpt-5-codexfor Codex).maxTurns— cap the agentic turns (default 25).sessionId— resume a previous session instead of starting fresh.allowedTools(Claude Code only) — restrict the tool surface; defaults toRead,Write,Edit,Bash,Glob,Grep.
The agent runs to completion (or until it hits the turn cap or a timeout), and the tool returns the agent's summary plus a list of files modified, commands run, and the session ID and token usage for the run.
Prerequisites
For any of these tools to work on a host or Sophon Node:
- The CLI must be installed and on
PATH(or at the configured CLI path). Each tool first checks installation and fails cleanly if the binary is missing. Admins can install or upgrade a CLI from the Settings → Coding Agents page. - The CLI must be authenticated using one of the methods in the table above. The integration reuses the CLI's own saved credentials, so a working
claude/codex/copilotsession on the host is enough. - The integration and the coding-agent mode must be enabled in configuration.
Optionally, set a workspace root so the agent can only operate inside a chosen directory tree — any workingDirectory outside it is rejected before the agent starts.
High risk and approval gates
Every coding-agent tool is rated High risk. It launches an autonomous agent with file-write and shell access on the host or node, so it always pauses for human approval before it runs.
Because the risk level is High, these tools pass through Approval Gates — the orchestration pipeline halts after the model requests the call and waits for a person to approve, reject, or edit it before the agent executes. Treat each delegation like granting shell access: review the task, the target directory, and the chosen agent before approving.
Choosing an agent
coding.claude_code— best for complex, multi-file refactors and when you want a restricted tool surface viaallowedTools.coding.codex— drives the OpenAI Codex CLI; pick it when your team is standardized on Codex auth or models.coding.copilot— drives the standalone GitHub Copilot CLI; convenient when authentication already flows through GitHub.
The capabilities are equivalent — all three read, write, and run commands autonomously. The practical difference is which provider's subscription, models, and auth you already have set up.
Related
- Claude Code Sessions — interactive, persistent Claude development sessions with a streamed event feed, the longer-lived counterpart to a one-shot
coding.claude_codedelegation. - Approval Gates & Risk Levels — how High-risk tools are gated.
- Sophon Node — run coding agents on a remote host with its own installed CLIs.