Skip to content

Add OnlyOnDemand plugin flag to defer expensive plugins#88

Open
C-Hipple wants to merge 2 commits intomainfrom
claude/add-on-demand-plugins-4Qtu4
Open

Add OnlyOnDemand plugin flag to defer expensive plugins#88
C-Hipple wants to merge 2 commits intomainfrom
claude/add-on-demand-plugins-4Qtu4

Conversation

@C-Hipple
Copy link
Owner

Summary

Adds support for marking plugins as "on-demand only" via a new OnlyOnDemand configuration flag. When enabled, these plugins are skipped during normal runs and only executed when explicitly requested by name. This allows expensive or resource-intensive plugins to be deferred until needed while still being discoverable via a "deferred" status in the database.

Changes

  • Add OnlyOnDemand boolean field to Plugin struct in config
  • Update RunPluginsForce() to skip on-demand plugins unless explicitly requested by name
  • Record "deferred" status in database for skipped on-demand plugins so clients know they exist but haven't been run
  • Export ParseConfigForTest() helper for testing config parsing
  • Add comprehensive test coverage for on-demand plugin behavior

Test Plan

  • Added unit tests covering:
    • Normal plugins run while on-demand plugins are skipped
    • On-demand plugins execute when explicitly requested by name
    • Empty plugin list still respects on-demand flag
    • OnlyOnDemand defaults to false in config parsing
  • go test ./... passes with new test cases

https://claude.ai/code/session_01NKp4J384seA5EbiaZyF4Kc

claude added 2 commits March 11, 2026 23:02
Plugins configured with OnlyOnDemand=true are skipped during normal
plugin runs and force reruns with an empty plugin list. They are only
executed when explicitly requested by name in the RerunPlugins handler.
Skipped on-demand plugins get a "deferred" status in the DB so clients
can display them as available but not yet requested.

https://claude.ai/code/session_01NKp4J384seA5EbiaZyF4Kc
Add OnlyOnDemand configuration option documentation with examples
and explanation of how on-demand plugins behave during normal runs
versus explicit rerun requests.

https://claude.ai/code/session_01NKp4J384seA5EbiaZyF4Kc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants