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
{{ message }}
Repository navigation
OpenCode: rtk hook check --agent opencode judges differently from the plugin #4518
rtk hook opencode (what the plugin calls) answers {} in two cases where rtk can't judge the rules, so the command runs as typed:
the active agent's markdown file declares permission:/permissions:;
a legacy permission key means different rules to OpenCode 1.x and 2.x (shell, sh*, b*).
rtk hook check --agent opencode loads the same rules through check_command_for_agent → load_opencode_rules and applies neither guard, so it can report a rewrite the plugin refuses. Example: a project opencode.json with {"permission":{"bash":{"ls *":"ask"},"shell":"allow"}}. rtk hook opencode ls -la prints {}, but rtk hook check --agent opencode ls -la reports rtk ls -la.
Found while reviewing #4187. Diagnostic only; rewriting is not affected.
A fix passes this row: in that directory, both commands agree, and hook check reports no rewrite.
Activity
rtk-wshm-sync-bot commentedon Oct 11, 2026
🔍 Automated Triage
bugmediumSummary
rtk hook check --agent opencodeskips the permission-declaration and legacypermissionkey guards thatrtk hook opencodeapplies, causing divergent judgments on OpenCode config.📁 Relevant files
src/hook/check.rssrc/hook/opencode.rsSuggested Actions
permissionkey handling) from the opencode hook…Triaged automatically by wshm · This is an automated analysis, not a human review.