pub struct EngineConfig {Show 13 fields
pub session_id: String,
pub harness: String,
pub api_schema: String,
pub model: String,
pub cwd: PathBuf,
pub workspace_root: PathBuf,
pub max_turns: Option<u32>,
pub resample_retries: u32,
pub resample_backoff: Duration,
pub sampling_args: SamplingArgs,
pub cache_hint: CacheHint,
pub streaming: bool,
pub instructions: InstructionsConfig,
}Expand description
Everything the loop needs that isn’t the provider, registry, preamble, or sink.
Fields§
§session_id: StringThe session identifier (stamped into the report + Init).
harness: StringThe harness pack in use, e.g. grok (stamped into the report + Init).
api_schema: StringThe wire schema in use, e.g. anthropic/mock (the provider’s api_schema).
model: StringThe model id (for Init).
cwd: PathBufThe working directory handed to each tool call.
workspace_root: PathBufThe path-jail root (ADR-0008), handed to each ToolCtx.
max_turns: Option<u32>The max sample→dispatch turns before terminating with MaxTurns
(ADR-0005 amendment 2026-07-18). None (the default) = unlimited —
every studied harness defaults to no cap (Claude Code’s maxTurns? is
enforced only when set; grok’s max_turns: Option<u32> defaults None;
codex has no turn cap at all).
resample_retries: u32Bounded loop-level resample budget on retryable provider errors (ADR-0007).
resample_backoff: DurationBase backoff between resamples; the nth retry waits base * n. Set to zero
in tests to avoid real sleeps.
sampling_args: SamplingArgsProvider-neutral sampling knobs.
cache_hint: CacheHintPrompt-cache placement hint for the wire.
streaming: boolUse the streaming sample path (locode_provider::Provider::stream) instead of
locode_provider::Provider::complete (ADR-0021). Default false — the headless one-shot
stays non-streaming; the TUI sets this, and headless can opt in via
--stream (Anthropic rejects non-streaming requests past ~10 min, so
streaming is required for unbounded output). Emits Event::MessageDeltas;
the final Message is still appended whole, so the trace can stay
whole-message by dropping the deltas (Q1).
instructions: InstructionsConfigShared project-instruction loading (AGENTS.md, ADR-0023): discovered from cwd
and injected once per session as a User <system-reminder>. Default = enabled.
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more