pub struct ClaudeCodeExecutor { /* private fields */ }Expand description
Drives claude --output-format stream-json --input-format stream-json ...
as the engine behind one sub-agent run.
Implementations§
Trait Implementations§
Source§impl ChildExecutor for ClaudeCodeExecutor
impl ChildExecutor for ClaudeCodeExecutor
Source§fn run<'life0, 'async_trait>(
&'life0 self,
spec: RunSpec,
events: EventSink,
steer: SteerInbox,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = ChildOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
spec: RunSpec,
events: EventSink,
steer: SteerInbox,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = ChildOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Activation logic (issue #444), driven by spec.messages — empty means
first activation, non-empty means a reactivation carrying prior
context (RunSpec.messages doc, proto.rs:28):
messagesempty → fresh session; delete any stale state file (arerunmust never accidentally resume).messagesnon-empty AND the state file has an id recorded against the SAMEworkspace→ spawn with--resume <id>, sending just the live assignment (the CLI already has the transcript).messagesnon-empty but no usable id (first run on this machine, storage GC’d, workspace changed) → fallback: render the shipped history into a bounded preamble prepended to the assignment.- If a
--resumespawn exits without ever producing aresultframe (bad/GC’d session id — the CLI errors out fast), retry ONCE without--resume, using the same fallback rehydration as step 3. No retry loop beyond this single attempt.
Auto Trait Implementations§
impl Freeze for ClaudeCodeExecutor
impl RefUnwindSafe for ClaudeCodeExecutor
impl Send for ClaudeCodeExecutor
impl Sync for ClaudeCodeExecutor
impl Unpin for ClaudeCodeExecutor
impl UnsafeUnpin for ClaudeCodeExecutor
impl UnwindSafe for ClaudeCodeExecutor
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
Mutably borrows from an owned value. Read more