Skip to content

Capture session duration, turn count, and model attribution as checkpoint metadata #18

@jcleira

Description

@jcleira

Description

Partio should capture structured metrics for each agent session: total duration (wall time from session start to end), number of turns (agent request/response cycles), and model name. These metrics should be stored in checkpoint metadata and exposed via partio explain and the app dashboard. This enables teams to understand AI usage patterns, cost attribution, and session complexity at a per-commit or per-PR level.

Source

Target Repos

  • cli
  • app
  • docs

Acceptance Criteria

  • Session start time is recorded when the agent session begins
  • Turn count is incremented on each agent turn-end hook event
  • Session duration is computed and stored when the session ends
  • All three metrics (duration, turns, model) are persisted in checkpoint metadata
  • partio explain displays duration, turn count, and model for each session
  • App dashboard renders session metrics in the session detail view
  • Metrics degrade gracefully if hooks for turn-end are not fired (e.g., agent crash)

Context Hints

  • cli/internal/session/
  • cli/internal/checkpoint/
  • cli/internal/hooks/

Comment /minion build or add the minion-approved label to begin implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    minion-doneMinion execution completedminion-proposalFeature proposal from minion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions