Track orchestrator agent task completions #372
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When the orchestrator dispatches a task to a coding harness (Claude Code, Codex CLI, OpenCode) and the task completes, emit a
TaskCompletionEventcapturing the full execution context.Context
The orchestrator manages agent task lifecycle: dispatch → monitor → collect results. This is the ideal point to capture end-to-end task metrics that the individual LLM call tracking (separate issue) cannot see — total duration across multiple LLM calls, retry behavior, quality gate enforcement results, and context window management.
Requirements
Event Fields to Capture
task_typecomplexityharnessmodel/providertask_duration_msestimated_*_tokensactual_*_tokensestimated_cost_usd_microsactual_cost_usd_microsquality_gate_passedquality_gates_runquality_gates_failedcontext_compactionscontext_rotationscontext_utilization_finaloutcomeretry_countlanguagerepo_size_categoryIntegration Points
Acceptance Criteria
Completed in commit
36e6cddon feature/m10-telemetry. Added _emit_task_telemetry to both Coordinator and OrchestrationLoop with agent-to-telemetry field mapping, non-blocking fire-and-forget. Tests passing.