Delegate tasks from Claude Code to other AI coding CLIs ("backends") to conserve Claude usage. One universal plugin with a capability-based adapter per backend.
Forked from openai/codex-plugin-cc (Apache-2.0); the Codex app-server runtime is replaced by headless CLI adapters.
| Backend | CLI | Enforced read-only | Resume | Live progress | Transfer | Notes |
|---|---|---|---|---|---|---|
| Grok (xAI) | grok |
✅ (plan mode) |
✅ | ✅ streaming-json | seeded | Default backend; structured output for review. |
| Pi Coding Agent | pi |
✅ (tool allowlist) | ✅ | ✅ JSONL feed | seeded | Per-turn token/cost usage. |
| Antigravity (Google) | agy |
✅ | ❌ plain text | seeded | Not allowed for review. | |
| Codex (OpenAI) | codex |
✅ (OS sandbox) | ✅ | ✅ JSONL feed | native import | codex exec headless; structured output; native review mode. On Windows the read-only sandbox needs codex's setup helper working (see notes). |
Pick a backend per run with --backend <id>, or set a per-repo default via
/clawdius:setup --default-backend <id>.
- Claude Code with plugin support
- Node.js >= 18.18
- At least one backend CLI installed and authenticated:
- Grok CLI — docs.x.ai (Grok CLI section), then
grok login - Pi Coding Agent —
npm install -g @earendil-works/pi-coding-agent, then runpionce to configure credentials - Antigravity CLI — antigravity.google, then run
agyonce to sign in - Codex CLI — developers.openai.com/codex/cli, then
codex login
- Grok CLI — docs.x.ai (Grok CLI section), then
From GitHub:
/plugin marketplace add vibecodingmd/clawdius
/plugin install clawdius@clawdius
From a local clone:
/plugin marketplace add <path-to>/clawdius
/plugin install clawdius@clawdius
Then run /clawdius:setup — it reports which backend CLIs are installed and
authenticated, with install/login hints for any that are missing.
After installing or updating the plugin, start a new Claude Code session
before using /clawdius:transfer: the transcript path it needs is exported by
a session-start hook, so a session begun before the install won't have it
(pass --source <path-to-claude-jsonl> as a manual fallback).
/clawdius:rescue [task]— delegate investigation or a fix to a backend (Grok by default)/clawdius:review [focus]— adversarial review of the working tree on a read-only backend;--nativeuses codex's built-in reviewer, and--native --commit <sha>reviews one commit/clawdius:transfer— hand the current Claude Code session to a backend: codex imports it as a real thread (visible turn history, no tokens), grok/pi/agy get a seeded handoff session that/clawdius:rescue --resumecan continue/clawdius:status [job-id]— show active and recent jobs, including recent progress and last activity/clawdius:result [job-id]— show the stored output of a finished job/clawdius:cancel [job-id]— cancel an active background job/clawdius:setup— check backend install/auth status, set the default backend
Add --write to let a task edit files. /clawdius:rescue --background keeps
the rescue in Claude Code's native task list and reports its result on
completion; --wait keeps it in the foreground. Direct companion CLI users can
still use task --background for a detached job and poll it with
/clawdius:status. Use --resume-last to continue the previous session.
- Every backend is spawned headless with stdin ignored and a hard kill timeout — several backend CLIs hang forever on an open stdin pipe in non-TTY subprocesses, and expired auth can present as a silent hang.
- Adapters implement
checkAvailability,checkAuth,buildTaskArgs,parseTaskOutput, and optional capabilities (streaming, resume, interrupt, native review) declared as flags. - Job tracking, background workers, and session-scoped status/result/cancel are inherited from the codex-plugin-cc job system.
- Live progress: backends that emit a JSONL event feed (grok
streaming-json, pi--mode json, codexexec --json) are parsed line by line as they run. Phase transitions (thinking → responding → finalizing), the backend session id, tool/command activity, and per-turn token usage are written to the job log as they happen, so/clawdius:status <job-id>shows a live preview plus the log's last-activity time during a long background run. The full stdout buffer is still the authoritative source for the final result — streaming is best-effort narration layered on top and never changes the parsed output. - Session transfer (
/clawdius:transfer) has two modes, picked by a per-backend capability flag. Codex supports a protocol-level import: a one-shotcodex app-serverconverts the Claude transcript into a real codex thread with visible turn history, spending no tokens (codex skips byte-identical re-imports, so transferring the same unchanged transcript twice reports an error pointing at the earlier thread). The other backends have no import protocol, so clawdius seeds a fresh read-only session whose first turn ingests a transcript digest; that session is registered as the newest resumable task, so/clawdius:rescue --resumecontinues it directly. - Adversarial review (
/clawdius:review) only runs on backends that can prove read-only execution (grok, pi, codex). Before a codex review on Windows the adapter runs a token-freecodex sandboxprobe and refuses the review if the OS sandbox can't be verified, so a review verdict is never produced by a backend that could have edited the tree.
The codex read-only sandbox depends on codex-windows-sandbox-setup.exe /
codex-command-runner.exe being launchable next to the codex launcher. The
standalone installer can leave them in the package's codex-resources folder
instead — if /clawdius:setup or a review reports the sandbox is broken, copy
both exes next to the launcher and, if prompted, approve the one-time UAC
elevation by running codex sandbox cmd /c "echo hi" once in your terminal.
Codex tasks that only read/reason work regardless; only shell-command and
review runs need the sandbox.
npm test
Apache-2.0. See LICENSE and NOTICE — Clawdius is forked from openai/codex-plugin-cc.