Skip to main content

evaluate_layer1

Function evaluate_layer1 

Source
pub fn evaluate_layer1(project_root: &Path, phase: u32) -> Option<AgentResult>
Expand description

Layer 1: Try to detect agent result from the native per-adapter envelope or the DEVFLOW_RESULT marker in stdout.

Precedence: Claude rate-limit envelope (a SPECIFIC failure that must outrank the generic is_error check — rate-limit envelopes carry is_error: true, and classifying them Failed would kill sequentagent’s handoff/cron path) → Claude envelope is_error: true (authoritative, overrides a success marker) → DEVFLOW_RESULT marker (portable; works for plain text and a Claude envelope’s unwrapped result text) → Codex JSONL event stream (turn.failed decisive; turn.completed defers) → Codex plain-text rate-limit heuristic (least authoritative, stays last).