/codexeni:delegationfrom codexeni
Discovers locally installed coding harnesses and delegates bounded coding, review, or test tasks to a worker harness, then polls, inspects conflicts, and independently verifies results.
Ships in codexeni. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when the user asks to delegate work to another local coding harness, or when the orchestrator judges that offloading an independent, bounded task to a worker harness would materially improve speed or quality. Every mutating start still requires the normal tool approval.
Claude Code and Codex have their own built-in subagents. Reach for this bridge when the value is in using a different harness or model: a second opinion from another vendor's model, a cheaper worker, a login you hold elsewhere, or a like-for-like comparison of the same model in two harnesses. delegate_discover also lists the orchestrator's own harness when it is installed (for example claude-code from inside Claude Code); delegating to it is allowed and runs as a separate headless process.
The orchestrator (the harness running this skill) is the final authority. The worker harness is an external process, and its output and filesystem changes are untrusted until the orchestrator reviews them. Do not describe a task as complete until the orchestrator has independently inspected the diff and run the relevant checks.
Before delegating:
delegate_discover once per session. Pick a harness whose installed is true and authStatus is authenticated, and an exact model from that harness's listed models. Codex reports its maintained compatible model list with modelSource: "static" because its CLI cannot enumerate the authenticated account's entitlements; the Codex CLI remains the final authority if an account cannot use a listed model. For a Codex task, always pass that chosen name as delegate_start.model; the bridge rejects an omitted model.BRIDGE_ALLOWED_ROOTS is set, treat it as the explicit override. Otherwise use standard MCP roots/list and roots/list_changed from clients that advertise them, accepting only file:// roots. When neither source provides a root, pass the user's current workspace as workspace; the bridge canonicalizes that exact path and uses it as the boundary for that task. Do not ask the user to configure an environment variable in this normal zero-config case. Never use ${PLUGIN_ROOT} or the MCP server's process.cwd as the user's workspace.AGENTS.md files and include the relevant constraints in the worker prompt. Tell the worker harness to read them too.taskMode: "read_only" for analysis, test suggestions, or a proposed patch. Require no file changes and set maxRetries no higher than 2.taskMode: "coding" only for an isolated, reversible change. Set maxRetries: 0, include the exact allowed paths, and tell the worker not to modify anything else.delegate_start with the harness and exact model chosen from delegate_discover, the chosen taskMode, maxRetries, high effort, and a bounded timeoutSeconds. A start call may edit files or run commands, so obtain the normal approval before making it.For the claude-code worker, read_only is enforced by the CLI flags as well as the prompt: the edit tools are removed and only read-only commands are approved, in every permission mode.
The bridge defaults to full permission mode: it passes the worker harness's equivalent of --dangerously-skip-permissions so a headless worker can edit files and run commands without prompting, since there is no human available to answer a prompt in a headless session. BRIDGE_PERMISSION_MODE=restricted is an explicit opt-in to per-call approval instead. When delegate_discover reports full, treat it as broad local tool authority: keep the task and workspace narrow, use a clean or disposable worktree, and inspect every change. Never switch a bridge's permission mode yourself, and never edit the worker harness's own settings; if a worker is blocked by a permission it lacks, report that to the user and let them add a narrow project-level rule.
The bridge permits up to four concurrent jobs locally. This is a local ceiling, not a published provider concurrency quota. Never schedule simultaneous writers for the same workspace; their changes are unsafe to overlap.
Allowed roots select the worker's cwd; they are not hard containment in full mode. The bridge passes a sandbox flag best-effort where the worker harness supports one, but that is not a guaranteed filesystem boundary for every tool or platform.
Every worker prompt must include:
After delegate_start returns a job ID, call delegate_status once with waitSeconds set close to the task's timeoutSeconds (up to the bridge's maxStatusWaitSeconds limit). That call stays open until the job is terminal — Claude Code holds it, so waiting for a result costs one tool call, not a poll loop. Only call it again if it returns still running. Never try to pause between calls with a shell command (sleep, Start-Sleep, wait-process, and similar); shell access may not even be available, and the tool call already waits. Request only a bounded event tail. Do not start duplicate jobs because a worker is still running.
awaiting_input is not terminal. It means the worker paused to ask one bounded question, and it holds no process and no concurrency slot while it waits. delegate_status returns the question in inputRequest, and interactionRound reports how many of the allowed rounds remain. Answer it with delegate_respond, which takes the job's jobId and one of two actions:
action: "answer" — you settle the question yourself and pass answer. Use this only when the answer is already supported by the task description or the repository, stays inside the declared scope, and is a reversible implementation detail. Also use it, with answeredBy: "human", to relay an answer a person already gave you outside the tool.action: "elicit" — the connected client asks a human directly. Use this for product decisions, scope changes, destructive or irreversible actions, and genuinely ambiguous intent. If the client cannot collect human input, ask the user yourself and relay the reply with action: "answer" and answeredBy: "human".For an eligible timed-out or failed conversation, delegate_status.continuation.action is "resume". Call delegate_respond with action: "resume" and an optional instruction to continue the same worker conversation. Polling returns compact events by default; use eventDetail: "full" only for debugging.
Never use either action to collect a credential, token, or password; those are configured out of band, and the bridge refuses to elicit them. A job is limited to a small number of clarification rounds, and repeating the same question ends it with an interaction-limit error rather than looping.
Terminal states are succeeded, failed, timed_out, canceled, and orphaned. On timeout, malformed output, CLI failure, or an orphaned job, report the failure and inspect the workspace before deciding whether a new bounded retry is safe. Use delegate_cancel when the user cancels, the scope is exceeded, or the worker is stuck. Do not kill an unrelated process.
Model quotas are account-level; the worker harness's own usage surface (for example, Antigravity's /usage) is the source of account state, not this bridge. A local job count is not a quota reading, and the bridge's four-job ceiling is not a provider promise.
Classify failures before recovery:
429, quota, or rate limit: check the worker's usage surface; do not retry coding tasks.Coding tasks never auto-retry. No-change read_only tasks may use at most two bounded retries, always with the same harness, model, and account. Do not automatically switch harness, model, or account, purchase paid capacity, or consume G1 credits. A rate/quota failure opens the circuit breaker for that harness/model pair; stop new attempts until the cooldown reported by delegate_discover expires.
When the job ends:
git status and compare the changed-file inventory with the baseline. Treat any file outside the declared allow-list as a scope violation.The orchestrator must run the narrowest relevant formatter/typecheck/test/build commands itself after review. Prefer the repository's documented verification command and run commands from the directory specified by that repository's instructions. Verify the expected behavior, not only that the worker reported success. Summarize the worker result, files changed, independent checks, failures, and any follow-up needed.
Never expose raw worker logs if they contain paths or sensitive data beyond what the user needs. The bridge is unofficial and does not make any harness's IDE, desktop app, or hosted agent API interchangeable with its local CLI.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
delegation, multi-agent, task-offloading, code-review, testing
npx claudepluginhub kushwho/codexeni --plugin codexeniOther plugins' skills for the same job