pub struct CodingAgentConfig {Show 19 fields
pub model: String,
pub system: Option<String>,
pub base_system: Option<String>,
pub workspace: PathBuf,
pub skills: Option<Vec<Skill>>,
pub disabled_skills: BTreeSet<String>,
pub max_turn_steps: u32,
pub thinking: ThinkingEffort,
pub tools: Option<Arc<ShellTools>>,
pub extra_resolver: Option<Arc<dyn ToolResolver>>,
pub transcript: Option<TranscriptSettings>,
pub summary_worker: Option<Arc<dyn Summarizer>>,
pub shell_env: BTreeMap<String, String>,
pub steering: Option<Arc<dyn Steering>>,
pub mcp_servers: Vec<McpServerLine>,
pub disabled_mcp_servers: BTreeSet<String>,
pub environment: Option<String>,
pub user_preferences: Option<String>,
pub vision: Option<String>,
}Expand description
Everything a CodingAgent needs besides the
provider.
Fields§
§model: StringModel identifier, passed through to
ChatParams.
system: Option<String>System prompt stamped into every request. None uses the base
prompt — base_system when set, the
built-in default otherwise; setting it replaces everything, it
does not append.
base_system: Option<String>The base prompt from the user’s SYSTEM.md, a Jinja template
rendered by render_system — a template
error fails the agent’s construction. None uses the built-in
default_system.
workspace: PathBufRoot all tools are scoped to; paths that escape it are rejected in-band to the model.
skills: Option<Vec<Skill>>Skills already collected elsewhere, for the prompt’s skills list.
None discovers from the filesystem — the global config
directory and the workspace’s .rhema/skills. A frontend with no
filesystem to discover from (the cloud sandbox) seeds the skill
files itself and passes the list; the model reads bodies through
the shell, so each path must resolve inside the workspace.
disabled_skills: BTreeSet<String>Skill folder names to drop from whichever list the prompt carries — the persisted off switch a frontend reads out of its config. The filter runs after collection and after discovery alike, so both supply paths honor it; an empty set (the default) changes nothing.
max_turn_steps: u32Cap on steps per turn; a turn still requesting tools past it fails
with AgentError::MaxIterations.
thinking: ThinkingEffortHow much reasoning the model should do; providers without a knob
ignore it, and ThinkingEffort::Default sends nothing.
tools: Option<Arc<ShellTools>>The shell resolver the agent’s tools run on. None builds one
over workspace — the default. A frontend that shares its shell
with an extension (the subagents extension reads the turn’s
approval hook off it) brings its own.
extra_resolver: Option<Arc<dyn ToolResolver>>An extension resolver merged over the shell’s tools through
Overlay: its specs join the
prompt’s tool list and its tools resolve by name, shadowing a
built-in of the same name. None runs the built-ins alone.
transcript: Option<TranscriptSettings>The transcript: a bounded request view over the unbounded
session, plus the zoom tool to read back through it. On by
default and below the budget a pass-through, so small sessions
are byte-identical to a transcript-less run. None is the off
switch: requests carry the whole history. See
specs/rhema-transcript.md.
summary_worker: Option<Arc<dyn Summarizer>>The compaction’s model fill: a cheap worker the transcript’s
stepped compaction runs at flushes, rewriting each new block
section’s extractive stand-in into a dense markdown block. The
worker never blocks or fails a request — a failed call leaves
the stand-in in place. None keeps the compaction extractive:
still stepped, still cache-stable, only less dense. See
specs/rhema-transcript.md.
shell_env: BTreeMap<String, String>Extra environment the shell tool’s commands run with, layered over the inherited one — how a frontend provisions its agent’s client tools (a daemon URL, a scoped token, a PATH addition) without touching the process environment.
steering: Option<Arc<dyn Steering>>A steering source the turn loop drains: one User-role message per
drain lands in the history at a step boundary, so work that
finished outside the turn (a background subagent) is announced to
the model. None — the default — runs the turn exactly as
before: the loop is the provided run_turn with no injection.
mcp_servers: Vec<McpServerLine>The wired MCP servers, as the prompt’s mcp section carries
them — the lines a frontend’s wire step produced (spec:
specs/rhema-mcp.md §10). Empty renders no section: a
frontend that wires nothing advertises nothing.
disabled_mcp_servers: BTreeSet<String>MCP server names to drop from the prompt’s section — the
persisted off switch a frontend reads out of its stored
settings, the disabled_skills
mechanism. Applied at stamp time over
mcp_servers by config name; the wire
step filters the same set before anything spawns.
environment: Option<String>The environment section rendered into the system prompt: machine
facts probed where commands run (see the environment
module). None renders the section empty.
A verbatim system prompt ignores it, like every template
section.
user_preferences: Option<String>The user-preferences section rendered into the system prompt —
the contents of the user’s global USER.md, verbatim, a
frontend that has one reads it and passes it here. None
renders nothing.
vision: Option<String>The prompt section documenting the wired
vision macro — the see bash
function’s documentation, produced by the frontend’s
provisioning and passed verbatim. None renders no section: a
frontend that wired nothing advertises nothing, the same rule
the mcp_servers section follows.
Implementations§
Source§impl CodingAgentConfig
impl CodingAgentConfig
Sourcepub const DEFAULT_MAX_TURN_STEPS: u32 = 2048
pub const DEFAULT_MAX_TURN_STEPS: u32 = 2048
Default for max_turn_steps. Long autonomous sessions — builds,
rebases, multi-package sweeps — routinely run hundreds of steps on
cheap models under a watching eye; the cap exists to end a runaway
loop, not to ration the model. --max-steps is the tighter leash
for unattended turns on expensive models.