Skip to content

Solenta guardrail deny/ask interception (classifyTool) is never applied to kimi runs #697

Closed

Description

@currentbits

Found in a full provider-feature audit. Solenta's own tool guardrails — the classifyTool deny/ask verdicts that block dangerous tool calls — are applied only inside the claude control_request branch (electron/runner.js:2925-2950). The kimi run path has no hook at all: runKimi spawns with stdio: ["ignore", ...] (electron/kimi.js:738), there is no control protocol, and kimi -p runs every tool unprompted.

Result: tools Solenta would block or gate for claude execute unconditionally on kimi threads, with no UI indication. Distinct from #177 (permission-mode picker being a no-op): that issue covers the mode the user picked being dropped; this one covers Solenta's own independent safety layer being absent.

Kimi has no documented permission-prompt protocol in headless mode, so a fix likely needs a different shape — e.g. pre-run tool allowlisting via config, or wrapping/hooking at the MCP layer where possible. Needs investigation.

Activity

  1. added
    bug
    plan:todo
    on Aug 25, 2026
  2. added
    plan:doing
    and removed
    plan:todo
    on Sep 2, 2026
  3. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Approach landed on this thread: Kimi -p still has no permission protocol. Official kimi-code 0.39 PreToolUse hooks fire in prompt mode, so the per-run KIMI_CODE_HOME overlay now registers electron/kimi-guardrail-hook.js (copied next to a copy of guardrails.js). classifyTool deny/ask → exit 2. Ask is deny on kimi (hooks fail-open on timeout). Transcript gets the same Guardrail blocked … event as Claude. CODER_GUARDRAILS=off skips the inject.

  4. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Grok follow-up is #812: same classifyTool hole, different cause (--always-approve skips can_use_tool instead of kimi having no protocol). PreToolUse hook in the GROK_HOME overlay; Claude path not touched.

  5. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
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