Skip to main content

Module sub_agent

Module sub_agent 

Source
Expand description

Sub-agent parallel execution for multi-file tasks.

Each SubAgent handles one file with its own Conversation + TurnRunner, running in parallel via tokio::JoinSet. This keeps each sub-agent’s context small (~3-4K tokens) so weak models perform well.

Structs§

Diagnostic
Per-task instrumentation snapshot. Populated as ProgressTracker observes turns; surfaced on SubAgentResult so the parent agent (and operators reading datalog) can diagnose without re-deriving from raw conversation history.
ResilienceConfig
Tunable knobs for the resilience layer of SubAgentTask::execute. Wired from Config::subagent at the call site; defaults match SubAgentConfig::default().
SubAgentPool
Pool that runs multiple SubAgentTasks in parallel with concurrency limits.
SubAgentResult
Result of a sub-agent execution.
SubAgentTask
A single sub-agent task: one file to modify.

Enums§

SubAgentFailure
Structured reason a sub-agent ended in failure. Replaces the old errors: Vec<String> so callers can match on discriminant instead of substring-matching on free text.