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
Cursor, Gemini and Droid permission loaders drop an unreadable or unparseable settings file's rules #4652
#4287 makes the Claude Code loader fail closed when a settings file exists but cannot be read or parsed (#4282). The other hosts' loaders still go through read_json in src/hooks/permissions.rs:
a read error is dropped with no warning (std::fs::read_to_string(path).ok()?);
a parse error prints [rtk] warning: failed to parse permissions from … and returns None.
Either way, the file's rules are gone. This affects:
Droid (droid_settings_scopes): commandDenylist / commandBlocklist are deny rules. RTK uses them to step aside, so Droid's own block fires on the original command.
Suggested shape: have read_json tell missing, parsed and unreadable/unparseable apart, and have each loader fail closed in its own terms. For Droid and Cursor that means stepping aside, the way a deny match already does. OpenCode's opencode.jsonc has its own issue (#4524).
Cursor/Droid/Gemini permission loaders silently drop a file's rules on read/parse failure instead of failing closed, enabling deny-rule bypass (e.g. git push) in Droid/Cursor; related to #4287/#4282/#4651.
📁 Relevant files
src/hooks/permissions.rs
Suggested Actions
Extend read_json in src/hooks/permissions.rs to distinguish missing/parsed/unreadable-or-unparseable, as done for Cla…
Make droid_settings_scopes, load_cursor_rules, and gemini_settings fail closed (step aside) on read/parse errors like a…
I am preparing a focused fix for the Cursor and Droid loader failures, with AI assistance. When an existing settings file cannot be read or parsed, RTK should leave the command unchanged so the host can apply its own checks. I am covering malformed/read-error settings, all Droid scopes, and valid/missing/empty controls through the actual hook CLI. Claude and OpenCode behavior are outside this patch. I checked the open PRs, including #4458 and #4658, and found no competing implementation of this specific failure path.
Activity
rtk-wshm-sync-bot commentedon Oct 18, 2026
🔍 Automated Triage
bughighSummary
Cursor/Droid/Gemini permission loaders silently drop a file's rules on read/parse failure instead of failing closed, enabling deny-rule bypass (e.g. git push) in Droid/Cursor; related to #4287/#4282/#4651.
📁 Relevant files
src/hooks/permissions.rsSuggested Actions
read_jsonin src/hooks/permissions.rs to distinguish missing/parsed/unreadable-or-unparseable, as done for Cla…Triaged automatically by wshm · This is an automated analysis, not a human review.
Ehsan-hash commentedon Oct 20, 2026
I am preparing a focused fix for the Cursor and Droid loader failures, with AI assistance. When an existing settings file cannot be read or parsed, RTK should leave the command unchanged so the host can apply its own checks. I am covering malformed/read-error settings, all Droid scopes, and valid/missing/empty controls through the actual hook CLI. Claude and OpenCode behavior are outside this patch. I checked the open PRs, including #4458 and #4658, and found no competing implementation of this specific failure path.