You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`pre-bash-python-check`|`python-environment-guard.js-disabled`| ⚠️ **DISABLED**| Same parsing logic with `shlex`, exact error messages. **Issue**: Opencode bash tool doesn't pass command in `input.args.command`|
67
+
68
+
## Critical Discovery
69
+
70
+
**Opencode's bash tool limitation**: During testing, we discovered that Opencode's bash tool doesn't pass the command string in `input.args.command` (or any `input.args` field). The `input.args` object is empty `{}` when the bash tool is invoked. This prevents plugins from intercepting and analyzing bash commands.
71
+
72
+
**Working solution**: Only `post-edit-linter.js` works because it uses `tool.execute.after` for the `edit` tool, where file information is available in `output.metadata.filediff.file`.
73
+
74
+
## Error Messages
75
+
76
+
All error messages match the original Claude Code hooks exactly, including:
77
+
- Linter output truncation to 50 lines
78
+
- "Divine admonition" for git commit blocking
79
+
- Warning messages for Python usage
80
+
81
+
## Testing
82
+
83
+
To test the plugins:
84
+
85
+
1.**File edit test**: Edit a Python file and verify linters run
86
+
2.**Git commit test**: Try `git commit -m "test"` and verify checks run
87
+
3.**Python usage test**: Try `python -c "print('test')"` and verify warning
88
+
89
+
## Troubleshooting
90
+
91
+
**Plugins not loading**:
92
+
- Verify `.opencode` symlink points to `.auxiliary/configuration/coders/opencode`
93
+
- Check Opencode version supports plugin API
94
+
- Ensure dependencies are installed (`npm install`)
0 commit comments