Skip to content

collect_agent_files now head-scans every agent jsonl per call — multiplies the whole-corpus walk cost #34

Description

@coryking

is_conversion_artifact detection calls read_provenance (file open + ≤8-line head read) on every agent transcript, on every collect_agent_files call. session_sources calls collect_agent_files per session per search; activity and grep paths pay the same. On a corpus with hundreds of sessions × many agents this multiplies the already-tracked whole-corpus walk cost (see the perf note in search.py session_sources docstring).

No caching exists on this path (load_transcript's mtime cache doesn't cover it). Breadcrumbs: a (path, mtime)-keyed module cache, or folding the probe into a single discovery pass. Surfaced by code review of PR #30 (efficiency angle + angle C, finding 6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    cc-explorerMCP server and typed JSONL toolkittech-debtCode quality, architecture smells, internal cleanup

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions