Problem
The guardrails plugin (guardrail.ts, team.ts) exists in packages/guardrails/profile/plugins/ but was never registered in opencode.json's plugin field.
Impact: At runtime via the binary, the guardrails plugin is never loaded. All hooks (21+ hooks, 1184 lines) are dead code at runtime.
Why tests passed: Scenario tests call Plugin.trigger() directly, bypassing config-based plugin loading. This masked the issue since Wave 1.
Root Cause
The plugin field in opencode.json drives plugin_origins in the config system, which feeds PluginLoader.loadExternal(). Without this field, the plugin loader receives an empty list.
Fix
Add "plugin": ["./plugins/guardrail.ts", "./plugins/team.ts"] to packages/guardrails/profile/opencode.json.
Verification
opencode debug config --print-logs → loading plugin path=file:///...guardrail.ts confirmed
- Integration test: plugin discovery → session.created → state init → hard blocks → env vars
Problem
The guardrails plugin (
guardrail.ts,team.ts) exists inpackages/guardrails/profile/plugins/but was never registered inopencode.json'spluginfield.Impact: At runtime via the binary, the guardrails plugin is never loaded. All hooks (21+ hooks, 1184 lines) are dead code at runtime.
Why tests passed: Scenario tests call
Plugin.trigger()directly, bypassing config-based plugin loading. This masked the issue since Wave 1.Root Cause
The
pluginfield inopencode.jsondrivesplugin_originsin the config system, which feedsPluginLoader.loadExternal(). Without this field, the plugin loader receives an empty list.Fix
Add
"plugin": ["./plugins/guardrail.ts", "./plugins/team.ts"]topackages/guardrails/profile/opencode.json.Verification
opencode debug config --print-logs→loading plugin path=file:///...guardrail.tsconfirmed