Skip to content

Capture tool-level events in checkpoint metadata #186

@jcleira

Description

@jcleira

Summary

Enrich checkpoint metadata with tool-level event data extracted from agent session transcripts. This provides finer-grained insight into what the agent actually did during a commit — which files it read, which tools it invoked, and what edits it made.

Motivation

Current checkpoints capture the session transcript as a whole, but don't extract structured data about individual tool invocations. Tool-level events would enable:

  • Better attribution: knowing exactly which files the agent touched and how
  • Richer checkpoint browsing: users can see a timeline of tool calls alongside the diff
  • Foundation for analytics: aggregating tool usage patterns across sessions
  • More accurate "files touched" tracking for multi-file agent sessions

Implementation Notes

  • Extend the JSONL parser in internal/agent/claude/ to extract tool use events (tool name, input summary, file paths)
  • Store tool events as a structured field in checkpoint metadata (e.g., tools_used array)
  • Keep extraction best-effort: log warnings on parse failures, never block checkpoint creation
  • Tool events should be lightweight summaries, not full tool input/output

Source

Inspired by entireio/cli#860

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