Skip to content

telemetry: add cli.run completion event with exit code — measure run success rate #688

@agents-squads

Description

@agents-squads

Problem

We emit cli.run when a user starts a squad run but have no signal for whether it succeeded or failed. The activation funnel has a blind spot between "ran" and "got value":

install → init → cli.run → ??? → D1 return

Without a completion event, we cannot tell whether users who churned ran successfully or hit errors.

Proposed event

{
  "event": "cli.run.complete",
  "properties": {
    "exit_code": 0,
    "duration_ms": 12345,
    "agent_count": 1,
    "had_error": false
  }
}

Why it matters

  • Distinguish "tried but failed" from "got value" in the activation funnel
  • Identify the most common failure modes (errors, timeouts, config issues) to prioritize fixes
  • Measure success rate trends over releases — know if a new version improves or degrades activation quality
  • The gap between run-started and D1-retained users is currently unmeasurable

User journey stage filled

install → init → cli.run → cli.run.complete (success/fail) → D1 return

Related

Source: analytics squad — blind spot identified from activation funnel analysis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions