Skip to content

[P2][OCR] Cache CLI discovery search directories per detection pass #54

Description

@Ryder-Sun

Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.

Finding: M-10. desktop/src/agents/cli/cli-discovery.cjs rebuilds search directories repeatedly across Agent kinds and probes, including redundant filesystem reads. This can slow startup Agent detection on machines with many local tool paths.

Expected fix:

  • Cache computed search directories for a detection pass or stable options signature.
  • Preserve platform-specific Finder, PATH, npm, and Windows shim behavior.
  • Add tests proving repeated probes do not recompute directory scans unnecessarily.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agent-runtimeLocal Agent adapters, permissions, sessions, and readinessenhancementNew feature or requestpriority:p2Platform expansion after core runtime work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions