Tutorial
Delegate tasks from Claude Code and Codex to Ancilo
Ancilo can act as a local worker for Claude Code or Codex through MCP. The calling agent provides a task and a project directory; a local model carries it out using the permitted tools. This connection does not automatically replace the calling service’s model or make its other work local.
Set up the model and connection
You need Ancilo with a configured local model and the installed client from which work will be delegated. The model must fit the memory currently available. Having its file installed does not mean it can be loaded alongside every other running application.
In Ancilo, open System and connect the desired client in the Claude Code and Codex section, or use the following commands in the command line. Connecting one client is sufficient to start. Before version 0.3.0, connecting from the app failed with “cannot run claude”; update first if you see this.
Codex asks before each call of an Ancilo tool. In non-interactive runs (codex exec) it cannot ask, so Ancilo’s tools must be approved up front; the delegation documentation gives the command.
ancilo connect claude
ancilo connect codexStart with a bounded read-only task
A first task summarising a few files can be checked without granting write access. Specify the absolute project directory, relevant files and expected output. Without a setting, allow: edit applies – so read-only access must be requested explicitly. The client needs access to the Ancilo tool; its own tool approval rules still apply.
Delegate a read-only task to Ancilo for the project /absolute/path/to/project. Summarise src/parser.rs and its tests. Identify the handled inputs and the error cases already tested, with file references. Do not change files or run shell commands. Use allow: read.
Distinguish write access from background work
For changes, allow: edit permits reading and writing within the project. allow: shell also permits commands in a sandbox without network access; choose it only when the task requires them. Ancilo itself limits what delegated tasks may do at most: in the Code area under Coding Tasks (visible in the expert view), where running tasks appear too. Synchronous delegation works directly in the project, so it does not use the copy workflow of the Tasks area.
With background: true, a delegated task works in its own Git worktree on the branch ancilo/<id> and commits there. The calling agent receives a task ID at once; the result can be retrieved later, for example with ancilo task <id> --diff --wait. Changes stay on that branch until they are merged after review. This mode requires a Git repository.
Ancilo decides which model does the work: a model named in the request, otherwise a rule for the kind of task, otherwise the model set in Ancilo for the Coding Tasks of Claude Code and Codex (the delegation role), otherwise the default model. ancilo route shows which model a kind of task would use and why.
git merge ancilo/<id>Review the output and actual changes
The returned result includes a summary and information about changed files. For a read-only task, compare the cited passages directly. For edits, inspect the diff and run the relevant project checks; a model’s success message cannot replace them.
Local processing itself incurs no per-request model fee. Work performed by the calling cloud agent may still incur costs or count towards usage limits. Its use also determines what information is processed outside Ancilo. Local delegation alone does not mean the entire workflow stays on the computer.