Skip to main content

load_all

Function load_all 

Source
pub fn load_all(
    claude_home: &Path,
    calc: &PricingCalculator,
) -> Result<(Vec<SessionData>, GlobalDataQuality)>
Expand description

Load all session data from a Claude home directory.

  1. Scans for JSONL files (main sessions + agents)
  2. Resolves legacy agent parent relationships
  3. Parses main sessions in parallel; groups agent files by agent_id into Subagent entries on their parent session
  4. Aggregates plugins / skills from main turns and hooks from main session stop_hook_summary entries (Claude Code 2.1.104+)
  5. Computes global time range and quality metrics

The PricingCalculator is used to populate per-plugin / per-skill cost fields on the aggregated metadata. Cost / token totals on the underlying turns are untouched.