Skip to content

Cursor/Kimi ssh/WSL turns skip pre-exec classifyTool; deny-tier tools run #834

Closed

Description

@currentbits

Follow-up from #821 / #812 / #813 / #700 / #671.

Problem

runner.js skips isolated HOME overlays and Cursor --plugin-dir when crossesBoundary(project) (ssh/WSL). Local process env is not forwarded across wrapCommand. Grok now deploys a remote GROK_HOME overlay (#821). Cursor and Kimi still have no remote pre-exec seam — a deny-tier tool can run before the stream notice.

Real seams (do not invent control_request)

  • Cursor: --plugin-dir + plugin preToolUse (classifyTool deny/ask is missing on Cursor, Codex, and OpenCode #813). Deploy the plugin onto the far side ($HOME/.solenta/cursor-guardrails/<threadId>), pass --plugin-dir through wrap. Hook command is posix node, not Electron execPath.
  • Kimi: [[hooks]] event = "PreToolUse" in $KIMI_CODE_HOME/config.toml (official docs). Deploy overlay + prefix wrap with env KIMI_CODE_HOME=.... Exit 2 or permissionDecision: deny. Matcher omitted = all tools.

Must not

  • Weaken the local Cursor plugin / HOME overlay
  • Touch the Claude control_request path
  • Invent a permission-prompt channel

Tests

Fail if a deny-tier tool on a crossesBoundary cursor or kimi turn produces no block. Same Guardrail blocked …: shell.curlpipe: event as local grok / Claude.

Out of scope

  • Codex / OpenCode remote overlays (same hole)
  • Cursor #700 HOME/MCP isolation across the bind
  • Reclaim of remote ~/.solenta/{cursor,kimi}-* dirs

Activity

  1. added
    bug
    plan:doing
    on Sep 2, 2026
  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Landed on this worktree (not the project checkout).

    Seams (no control_request)

    • Cursor: deploy #813 plugin to $HOME/.solenta/cursor-guardrails/<threadId>, pass --plugin-dir through wrap. posix node.
    • Kimi: official [[hooks]] event = "PreToolUse" in $KIMI_CODE_HOME/config.toml. Deploy slim overlay + env KIMI_CODE_HOME= via boundaryArgv.

    Unchanged: local Cursor plugin / HOME overlay, local materializeKimiHome, Claude control_request.

    Tests: electron/test/cursor-guardrail-remote.test.js, electron/test/kimi-guardrail-remote.test.js fail if a deny-tier tool on a crossesBoundary turn produces no block. Related local suites 165/165.

    Still open: Codex/OpenCode runner skip, workflow skipKimiOverlay, remote dir reclaim, Cursor #700 HOME across the bind.

  3. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Remote overlay + kimi/cursor remote tests landed on origin/main via #840. Leaving this open if ssh/WSL still skip the pre-exec seam.

  4. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
  5. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Worktree already on origin/main via #840 (ca6c5146). Closing and marking plan:done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions