Skip to content

feat: Coordinator diagnostic breadcrumbs as OTel span attributes #32

@diberry

Description

@diberry

Problem

When spawns fail, there is no record of the system state at spawn time. The existing OTel stack has agent spawn spans but no context-size attributes.

From

Telemetry + Procedures reviews of #21. Phase 3 in revised plan.

Proposed

Add captureSpawnContext() function (separate from runDoctor()) that records as span attributes on squad.lifecycle.spawnAgent:

  • decisions_md_bytes: decisions.md size
  • charter_bytes: agent charter size
  • history_bytes: agent history size
  • context_tokens_actual: from model response usage field
  • context_utilization_pct: actual / model window
  • spawn_model: resolved model name
  • routing_rationale: why this agent was chosen

NOT markdown in orchestration logs — structured OTel attributes.

Owner

Telemetry (Observability) + EECOM (Core Dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:flightAssigned to Flight (Lead)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions