External coding CLIs
Run Claude Code, OpenAI Codex, Gemini CLI, and OpenCode inside CodePanel's worktrees, OS sandbox, and key-holding model proxy.
On this page›
CodePanel's local runner can drive external coding CLIs (Claude Code, OpenAI Codex, Gemini CLI, and OpenCode) inside the same git worktree, OS sandbox, and model proxy used by CodePanel's own agent loop. Provider API keys never reach your laptop, spend caps apply on every call, and every pull request they open goes through the review panel.
Supported external CLIs
| CLI | Proxy wire format | Permission handling |
|---|---|---|
| Claude Code | Anthropic Messages API | Maps permission prompts directly onto CodePanel's inbox interrupts (ask). |
| OpenAI Codex | OpenAI Responses API | Runs in its most restrictive non-interactive edit mode inside the sandbox. |
| Gemini CLI | Gemini generateContent API |
Runs in its most restrictive non-interactive edit mode inside the sandbox. |
| OpenCode | OpenAI-compatible / provider routes | Runs in its most restrictive non-interactive edit mode inside the sandbox. |
How the runner isolates external CLIs
Before starting an external CLI in a run's worktree, the runner applies four controls:
- Scrubbed environment: Strips parent secrets and passes only the exact allowlisted environment variables plus a short-lived CodePanel run token.
- Model proxy routing: Points the CLI's API base URL at CodePanel's model proxy. The proxy verifies the run token, enforces per-task, per-ticket, and daily spend caps, attaches your encrypted provider key (or credits at cost), and forwards the call.
- OS sandbox and git containment: Runs the CLI inside
sandbox-exec(macOS) orbwrap(Linux) and verifies git boundaries after tool results. - Independent verification: A run counts as finished only when the repository's configured checks pass on what the CLI committed, regardless of what the CLI claims.
Data-boundary restriction
Repositories with a run contract that grants production read MCP tools (productionReads) refuse external agent CLIs before the run starts, because external CLIs may carry their own telemetry or auxiliary requests outside the data boundary. Use CodePanel's own agent loop on approved zero-retention providers for production-read tasks.
See Desktop app to connect your machine, Local sandbox for command confinement, and Coding agents for the full architecture.