Codex and Claude agent learners#
Use evolver.name: codex or claude when a learner should inspect trajectories, use tools, and edit an adapter
directory over several actions. This is useful for skills, multiple files, and tool code that a single text rewrite
does not capture well. On the single-file prompt-only template, the Codex learner is the prompt-only
method.
Requirements and setup#
Install and authenticate the selected learner CLI in the environment where training runs. Sandboxed program execution uses Linux and bubblewrap. The acting pipeline can use a different model or host.
evolver:
name: codex
resume: false
sandbox:
enabled: true
network: restricted
Complete the endpoint grants, environment, and task resources for your learner; the fragment alone is not a working model configuration. Use Installation and configuration boundaries.
Update contract#
The learner edits the working adapter using the step’s learning material and EVOLVER.md. The Trainer owns
acceptance and Git history. Files outside the learnable rules are rejected or repaired. For a performance gate,
the method must explicitly evaluate and select candidates; file checks alone do not provide one.
Persistent learner state, host conversation resume, and Trainer crash recovery are separate mechanisms.
Only enable evolver.resume for a backend that declares support; check reports unsupported requests.
Defaults#
Codex:
description: A Codex agent improves the adapter from the step's learning material.
class: hermit.evolver.agent:AgentEvolver
needs: []
params:
backend: codex
prompt: START.md
resume_prompt: RESUME.md
args: []
model: null # the agent's model; null: its default
price: null # USD per million tokens {input, cached_input, output}
home: [auth.json, .credentials.json] # files of the agent's home copied into the run's
tools: null # the only Trainer tools the agent may use, e.g. [check_spec]; null: all
hide: null # paths hidden from the agent besides examples/tests/docs/.git; null: nothing hidden
Claude:
description: A Claude Code agent improves the adapter from the step's learning material.
class: hermit.evolver.agent:AgentEvolver
needs: []
params:
backend: claude
prompt: START.md
resume_prompt: RESUME.md
args: []
model: null # the agent's model; null: its default
price: null # USD per million tokens {input, cached_input, output}
home: [auth.json, .credentials.json] # files of the agent's home copied into the run's
tools: null # the only Trainer tools the agent may use, e.g. [check_spec]; null: all
hide: null # paths hidden from the agent besides examples/tests/docs/.git; null: nothing hidden
prompt and resume_prompt name learner instructions; args passes CLI arguments. Inspect the built-in
definition before replacing prompts. For a custom learner harness, use
AgentEvolver or CommandEvolver.
Report usage outside the framework’s metered tools so budget records remain meaningful. A learner’s direct external calls are not automatically accounted for merely because the Trainer launched it.
Learner tool access#
Agent-backed learners can set evolver.params.tools to an allowlist such as [check_spec]; null exposes all
Trainer endpoint tools. The gate refuses calls outside that list. Inspect the selected method’s defaults and
hermit/evolver/gate.py. This controls the learner’s Trainer-tool endpoint, separately from the acting
agent’s task/adapter tools. It does not make arbitrary shell commands safe or impose a mandatory check order.
For a complete task-specific Codex configuration, see examples/clbench_poker/prompt_only/run.yaml. Acting agents are configured under agent; evolver.name: codex selects the
learner, not the acting host.