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
classifyTool deny/ask is missing on Cursor, Codex, and OpenCode #813
classifyTool (#409) is enforced on Claude can_use_tool and (on the #697 branch) Kimi PreToolUse. Cursor, Codex, and OpenCode still run denied tools unprompted: curl|sh, .env reads, force-push, writes outside the worktree.
Do not invent a control_request they do not have. Use each CLI's real pre-exec seam. Reuse electron/guardrails.jsclassifyTool. Ask-tier is deny on all three: every seam fail-opens on timeout or unsupported ask.
Landed on this thread (uncommitted). Each provider uses its real pre-exec seam; none invent a control_request.
Cursor — second --plugin-dir (solenta-guardrails) next to the #686 pin plugin. preToolUse returns { permission: "deny" }. --force still honors explicit deny.
Codex — isolated CODEX_HOME overlay writes hooks.json (never the user's ~/.codex/hooks.json), copies the hook + guardrails.js, sets --dangerously-bypass-hook-trust and -c features.hooks=true. Deny is exit 2.
OpenCode — OPENCODE_CONFIG_DIR plugin (tool.execute.before throws). Not worktree .opencode/ (the agent can delete that).
Ask is deny on all three (Cursor ask is not enforced under --force; Codex ask fail-opens; OpenCode cannot prompt). CODER_GUARDRAILS=off skips inject. ssh/WSL skip the overlay.
Tests: electron/test/*-guardrail-hook.test.js drive the hook/plugin before any tool would run; runner suites assert the inject.
Cursor/Codex/OpenCode guardrail hooks from the leftover worktrees are now on origin/main via #840. Leaving this open until the ssh/WSL skip (#834/#835) is verified separately.
Activity
currentbits commentedon Sep 2, 2026
Landed on this thread (uncommitted). Each provider uses its real pre-exec seam; none invent a
control_request.Cursor — second
--plugin-dir(solenta-guardrails) next to the #686 pin plugin.preToolUsereturns{ permission: "deny" }.--forcestill honors explicit deny.Codex — isolated
CODEX_HOMEoverlay writeshooks.json(never the user's~/.codex/hooks.json), copies the hook +guardrails.js, sets--dangerously-bypass-hook-trustand-c features.hooks=true. Deny is exit 2.OpenCode —
OPENCODE_CONFIG_DIRplugin (tool.execute.beforethrows). Not worktree.opencode/(the agent can delete that).Ask is deny on all three (Cursor ask is not enforced under
--force; Codex ask fail-opens; OpenCode cannot prompt).CODER_GUARDRAILS=offskips inject. ssh/WSL skip the overlay.Tests:
electron/test/*-guardrail-hook.test.jsdrive the hook/plugin before any tool would run; runner suites assert the inject.currentbits commentedon Sep 2, 2026
Cursor/Codex/OpenCode guardrail hooks from the leftover worktrees are now on
origin/mainvia #840. Leaving this open until the ssh/WSL skip (#834/#835) is verified separately.currentbits commentedon Sep 2, 2026
Worktree already on origin/main via #840 (
ca6c5146). Closing and marking plan:done.