pub struct ExternalLoopConfig {
pub max_turns: Option<u32>,
pub timeout_secs: Option<u64>,
pub repair_invokes: u32,
pub transient_retries: u32,
pub model: Option<String>,
pub deadline: Arc<SessionDeadline>,
pub baseline_captures: BaselineCaptures,
}Expand description
Tuning for external delegation.
Fields§
§max_turns: Option<u32>Per-invocation model-turn cap (maps to the CLI’s --max-turns).
timeout_secs: Option<u64>Per-invocation wall-clock budget (runner clamps to 1h).
repair_invokes: u32Fresh repair invocations after a red first pass (the stream-json protocol has no session resume yet, so repairs re-state the task plus the failing-check output).
This is the hypothesis budget: each one buys another attempt at
being right. It is deliberately not spent on transport failures — see
transient_retries.
Defaults to 2 because recurrence escalation needs it. Round 1
establishes a failure signature, round 2 is the first that can repeat it,
and only round 3 can be told it did. At 1 the loop still detects the
repeat, but the session ends before the feedback carrying that news
reaches anyone — and since rpc is the only construction site and takes
..Default::default(), a default of 1 made the escalation unreachable in
every shipped configuration.
The cost is smaller than it looks: worst-case invocations are
max_hypotheses + transient_retries, so this moves 3 -> 4, about +33%,
and only on sessions that are already failing.
transient_retries: u32Re-invocations after the CLI process itself died mid-run (timeout or I/O) with the contract still red.
Separate from repair_invokes because it buys a different thing: an
availability retry, not a new hypothesis. Sharing one counter means a
single flaky timeout eats a replan the coder needed for an actual
hypothesis — the difference between a session that recovers and one that
silently gives up on a task it was about to finish.
model: Option<String>Pin the external CLI’s backbone (coder.start’s model). None = the
CLI’s own default.
The paired A/B only measures the harness when both arms share a
backbone; this is the external half of that invariant (the native half is
NativeLoopConfig.model). Before this existed the pin reached only the
native loop, so “both arms on gpt-5.5” was an unverified assumption.
deadline: Arc<SessionDeadline>The session’s absolute deadline, SHARED with every other rung of the
fallback ladder. See super::budget for why this is a handle and not
a value.
baseline_captures: BaselineCapturesThe session-start baseline captures differential checks compare against (car#1067). Empty when the contract declares none; differential checks fail closed under an empty map.
Trait Implementations§
Source§impl Clone for ExternalLoopConfig
impl Clone for ExternalLoopConfig
Source§impl Debug for ExternalLoopConfig
impl Debug for ExternalLoopConfig
Auto Trait Implementations§
impl Freeze for ExternalLoopConfig
impl RefUnwindSafe for ExternalLoopConfig
impl Send for ExternalLoopConfig
impl Sync for ExternalLoopConfig
impl Unpin for ExternalLoopConfig
impl UnsafeUnpin for ExternalLoopConfig
impl UnwindSafe for ExternalLoopConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more