Skip to the content.

Plugin Registration Survives Directory Removal (Gotcha)

Observed: goose 1.60.x, 2026-11-20 (found 2026-11-24).

Gotcha

When goose runs in a project that has <project>/.agents/plugins/<name>/, it records the plugin in the global ~/.config/goose/config.yaml:

plugins:
  /tmp/hooktest/.agents/plugins/always-block:
    enabled: true

Deleting the plugin directory does not remove this entry. The official docs describe discovery (~/.agents/plugins/, <project>/.agents/plugins/) and disabling (disabledPlugins in settings.json), not this persisted map.

Evidence

Teardown for hook / plugin tests

A test’s teardown removes every side effect, not only its files:

  1. Remove the test directory (rm -rf /tmp/<test>).
  2. Remove the plugin’s entry from ~/.config/goose/config.yaml plugins: (back up the file first). Check: grep -n '<test path>' ~/.config/goose/config.yaml prints nothing.
  3. Untested option: run the test goose run with a throwaway HOME so the registration lands in a disposable config. Verify before relying on it.