Bug Report: observal scan Crashes with TypeError on OpenCode Plugin Discovery
Duplicate Check
Steps to Reproduce
- Install an OpenCode plugin or ensure
~/.config/opencode/plugins/ contains at least one .ts / .js file.
- Run the following command:
- The CLI crashes with a
TypeError instead of completing the scan.
Expected Behaviour
observal scan should successfully parse the OpenCode plugins directory and report all discovered hooks — without crashing.
Actual Behaviour
The command crashes immediately with:
TypeError: DiscoveredHook.__init__() missing 3 required positional arguments:
'handler_type', 'handler_config', and 'description'
Root cause: DiscoveredHook is instantiated without its required positional arguments in:
observal_cli/ide/opencode.py
Investigation Notes
The bug is isolated to the OpenCode adapter. The following adapters correctly pass all required arguments to DiscoveredHook and are unaffected:
| Adapter file |
Status |
claude_code.py |
✅ Correct |
copilot_cli.py |
✅ Correct |
kiro.py |
✅ Correct |
antigravity.py |
✅ Correct |
opencode.py |
❌ Missing handler_type, handler_config, description |
Support Bundle
observal-support-20260610-192015.tar.gz
Additional Context
A local fix has already been developed on a separate branch. The fix updates the DiscoveredHook instantiation in opencode.py to include the three missing fields: handler_type, handler_config, and description.
A Pull Request is ready to open as soon as this issue is triaged.
Bug Report:
observal scanCrashes withTypeErroron OpenCode Plugin DiscoveryDuplicate Check
Steps to Reproduce
~/.config/opencode/plugins/contains at least one.ts/.jsfile.TypeErrorinstead of completing the scan.Expected Behaviour
observal scanshould successfully parse the OpenCode plugins directory and report all discovered hooks — without crashing.Actual Behaviour
The command crashes immediately with:
Root cause:
DiscoveredHookis instantiated without its required positional arguments in:Investigation Notes
The bug is isolated to the OpenCode adapter. The following adapters correctly pass all required arguments to
DiscoveredHookand are unaffected:claude_code.pycopilot_cli.pykiro.pyantigravity.pyopencode.pyhandler_type,handler_config,descriptionSupport Bundle
observal-support-20260610-192015.tar.gz
Additional Context
A local fix has already been developed on a separate branch. The fix updates the
DiscoveredHookinstantiation inopencode.pyto include the three missing fields:handler_type,handler_config, anddescription.A Pull Request is ready to open as soon as this issue is triaged.