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
Grok ssh/WSL turns skip the PreToolUse overlay; deny-tier tools run #821
Follow-up from #812. The isolated GROK_HOME overlay injects classifyTool as a Grok [[hooks.PreToolUse]] handler. runner.js skips that overlay when crossesBoundary(project) (ssh / WSL) and falls back to ensureGrokMcpConfig into ~/.grok — MCP only, no hook. wrapCommand also does not forward GROK_HOME, so a local overlay is invisible to the remote CLI.
Result: a deny-tier tool (curl | sh via run_terminal_command) can execute on the remote before the after-the-fact Guardrail stream notice.
Grok has no --hooks flag. Real pre-exec seam that survives the bind: deploy the same hook files onto the other side and prefix the wrap with env GROK_HOME=.... Official docs: PreToolUse still denies under --always-approve; $GROK_HOME/config.toml hooks are always trusted. The hook command must use remote node, not the local Electron process.execPath.
Do not weaken the local overlay or the Claude control_request path.
Tests must fail if a deny-tier tool on a crossesBoundary grok turn produces no block.
Implemented on coder/fork-fork-solenta-guardrail-deny-ask-int-5be3d7 (this thread, uncommitted).
Grok has no --hooks flag. The ssh/WSL seam is the same PreToolUse overlay as #812, deployed onto the far side:
deployGrokGuardrailOverlay writes $HOME/.solenta/grok-homes/<threadId> via wrapCommand (hook.js + guardrails.js + config.toml; auth/session symlinks from remote ~/.grok)
wrapCommand / resolveSpawn prefix env GROK_HOME=... so the remote CLI sees it (process env is not forwarded)
Hook command is posix node, not local Electron process.execPath
CODER_GUARDRAILS=off skips deploy
Claude control_request unchanged
Tests: electron/test/grok-guardrail-remote.test.js fails if a deny-tier tool on a crossesBoundary grok turn produces no block. Related suites green (141 in the grok/guardrail/ssh/wsl set).
Limits: remote node required (hooks fail open); remote dests are not reclaimed; live grok 1.0.5 over ssh is not in CI.
Activity
currentbits commentedon Sep 2, 2026
Implemented on
coder/fork-fork-solenta-guardrail-deny-ask-int-5be3d7(this thread, uncommitted).Grok has no
--hooksflag. The ssh/WSL seam is the same PreToolUse overlay as #812, deployed onto the far side:deployGrokGuardrailOverlaywrites$HOME/.solenta/grok-homes/<threadId>viawrapCommand(hook.js + guardrails.js + config.toml; auth/session symlinks from remote~/.grok)wrapCommand/resolveSpawnprefixenv GROK_HOME=...so the remote CLI sees it (process env is not forwarded)node, not local Electronprocess.execPathCODER_GUARDRAILS=offskips deploycontrol_requestunchangedTests:
electron/test/grok-guardrail-remote.test.jsfails if a deny-tier tool on acrossesBoundarygrok turn produces no block. Related suites green (141 in the grok/guardrail/ssh/wsl set).Limits: remote
noderequired (hooks fail open); remote dests are not reclaimed; live grok 1.0.5 over ssh is not in CI.currentbits commentedon Sep 2, 2026
Worktree already on origin/main via #840 (
ca6c5146). Closing and marking plan:done.Merge worktree coder/fork-fork-fork-solenta-guardrail-deny-as-e9699f:…