Skip to content

perf(plugin-profiles): have status read install records from disk instead of starting claude plugin list #17656

Description

@kyle-sexton

Outcome

profiles.mjs status (with and without --json) answers in under 2 seconds when a profile is recorded, by reading the install records from disk as the session-start path already does, instead of starting a nested claude plugin list --json.

Evidence

Measured for #16455 on WSL2 with Claude Code 2.1.329 (hyperfine, 2 warmup runs, 15 runs):

  • profiles.mjs status --json with no profile recorded: mean 45.0 ms (33.5 to 61.9 ms) at normal load.
  • claude plugin list --json alone, the child that status starts once a profile is recorded: mean 1.517 s (1.299 to 2.151 s) at normal load, and mean 2.215 s (1.575 to 3.792 s) under load.
  • Not measured: status end to end with a profile recorded, because applying a profile writes the measuring machine's settings. The estimate above puts that path over the 2-second line Verify the plugin-profiles CLI on the Windows lane and time status on the owner's machine #16455 sets.

Read on main at fe1809d4e6:

  • plugins/plugin-profiles/scripts/profiles.mjs:1118: const s = statusOf(opts, where, env, () => recordsFromCli()); (the path a person runs).
  • plugins/plugin-profiles/scripts/profiles.mjs:1110: const s = statusOf(opts, where, env, () => recordsFromDisk(where.configDir)); (the --session-start path).
  • plugins/plugin-profiles/scripts/profiles.mjs:949: recordedStatus calls records() for installedSince whenever a record exists.
  • plugins/plugin-profiles/lib/inventory.mjs:4-6: recordsFromDisk returns "the same records from plugins/installed_plugins.json, for a session-start run that must not start a nested claude".

Owner decision of 2026-11-20 on #16455 (option B): have status read the plugin records from disk as a new work item, and keep #16455 open until it lands.

Done when

  • status and status --json read install records with recordsFromDisk and start no claude child process; a test asserts that no child is started on the plain status path with a profile recorded.
  • status output for a recorded profile is unchanged where the disk records and the CLI records agree; any field the disk records cannot supply is named in the pull request body.
  • A test or recorded measurement shows status --json with a profile recorded finishing under 2 seconds.
  • The commands that change settings (apply, launch, the install paths) keep reading through recordsFromCli.
  • A changelog fragment under .changes/plugin-profiles/ describes the change.

Refs: #16455

Activity

  1. added
    needs-triage
    on Nov 20, 2026
  2. github-actions commented on Nov 20, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: plugin-profiles status command (profiles.mjs), its tests and a changelog fragment; people running profiles.mjs status.
    Reversible: yes; revert the change so status reads through recordsFromCli again.
    Open questions: none
    Understood: switch status to read install records from disk via recordsFromDisk, as the session-start path already does, so it starts no nested claude plugin list. apply, launch and the install paths stay on recordsFromCli. The done-when items are exact. I found no open duplicate and no merged pull request that already does this. It refs #16455.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 20, 2026
  4. melodic-automation-lanes commented on Nov 20, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"e8beb10b2604aee8b2601cff8bb080c1df7a7d09086ff6d833c981a4041d21be","body_sha256":"01b46db9c6dd3f5df560d9b278b5f3c2fed5bf95381238042aee4704e5df8234"}

  5. melodic-automation-lanes commented on Nov 20, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44761997227, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share, or the window was projected to have under its start-project share of the header's limit left by the run's expected end (github-token start-gate, start-project and start-run-minutes in rate-limits.json; the run's start-gate notice names which); that run ended at 2026-11-20T15:20:35Z. work-unblock has now removed and added agent-ready back to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or the kill-switch wait.

  6. github-actions commented on Nov 20, 2026

    @github-actions
    Contributor
    No description provided.
  7. github-actions commented on Nov 20, 2026

    @github-actions
    Contributor
    No description provided.
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

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions