# Claude Code and Codex engines

> Assign subagent roles to Kaitoi, local, Claude Code, or Codex engines, understand credential and billing boundaries, and review the engine's start grant.

Source: https://kaitoi.io/docs/cli/engines/
Section: Kaitoi CLI / Subagents and Crew
Written for: Code users combining installed coding agents.
Prerequisites: The chosen external CLI installed and signed in separately
Last reviewed: 2026-10-24

---

An engine decides which runtime handles a subagent role. It does not replace
the main conversation's model. CLI **0.9.0** supports `kaitoi`, `local`,
`claude`, and `codex` engines.

## Assign a role

Inside Code:

```text
/agents engine reviewer codex
/agents engine implementer claude
/agents engine explore local local:ollama <model-id>
```

Use an actual model ID from your local catalog. External engines accept an
optional model supported by that installed CLI; they do not take a Kaitoi
provider argument. `/agents engine <name> default` removes the saved role
override. These commands save role settings in user `agent.json`; inspect
`/agents` after changing them.

## Understand selection and credentials


The main Code session keeps its selected model. A reviewer role can be routed
to an installed Codex engine, an implementer to installed Claude Code, and an
explorer to a configured local model. User role settings take priority over an
agent file's engine, then the session default. Compatible model settings are
resolved within that engine. Each external CLI keeps its own login and usage;
Kaitoi does not copy its account credential into it.

The main conversation line remains intact while its review task branches to a Codex or Claude module. The selected module has its own client login and returns review evidence to the main conversation.

*Figure: A role's engine is separate from the main conversation's provider and model.*

Selection priority is the role override in `agent.json`, then an explicit
engine in the agent file, then the session's engine/provider. Model inheritance
uses compatible settings for the chosen engine and provider. A bare `model`
field in a compatible agent file applies to Claude; it does not by itself
force a switch to the Claude engine.

Kaitoi-hosted roles use Kaitoi authentication and credits. Direct local inference
has no Kaitoi inference charge. Claude Code and Codex use their separately
installed and signed-in CLIs under your account. Their plan or provider usage
is distinct from any paid Kaitoi tools the larger workflow uses. Do not treat
external delegation as universally free.

The external engine's model usage does not appear in Code's `/cost` total and
is not counted by `--max-credits`. Check that engine's own account and usage
controls. A paid Kaitoi tool invoked by the workflow is a separate charge.

## Review how each engine gets authority

An external start needs approval even for a read-only task, because it invokes
your external agent account. A foreground Claude engine can relay edit and
command decisions through the parent permission cards. A foreground Codex
engine cannot ask midway through its run, so its bounded start grant and
sandbox define the authority available to it. Background engines also operate
within their approved bounded grant.

Read the requested directory, tools, writes, commands, and limits before
approval. Changing the role's engine is configuration; it does not start the
agent or approve its next job.

External engines reach Kaitoi through a bridge that holds no account credential.
It exposes the applicable API documentation, product knowledge and API tools;
read-only roles get read tools, and background agents do not get paid tools.
The bridge does not expose Code's local-file tools, Crew or your other MCP
servers. The engine uses its own local tools under its start grant and sandbox.

## Continue or diagnose an external job

Ask Code to continue the existing agent using its returned ID when that engine
supports continuation. Starting a new unrelated agent is not the same as
resuming the external session. `/agents show <id>` helps inspect the task
before choosing the next action.

Missing or signed-out external CLIs are detected before the start approval.
Follow that engine's sign-in instructions, then retry the intended role. Check
the installed CLI's supported model names instead of borrowing another engine's
IDs. Source support does not establish that every platform and external CLI
version has been tested together; inspect the actual error and environment.
