kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

LLM-based bash command auto-approval (inspired by Claude Code "auto mode" / legacy kilo "gatekeeper")

Open marius-kilocode opened this issue 7 months ago • 11 comments

Problem

Approval fatigue in agentic coding sessions is real: Anthropic reports that Claude Code users approve 93% of permission prompts (source). Today Kilo CLI has two blunt settings: manual prompts on every risky tool call, or POST /permission/allow-everything which disables all guardrails. There is no middle ground — nothing looks at a bash command and decides "this one is safe, don't bother the user."

The legacy kilocode extension had this feature and called it the AI Gatekeeper. On March 25, 2026 Anthropic shipped a conceptually identical (but more sophisticated) feature called "auto mode" in Claude Code. We should bring the gatekeeper back, and use Claude Code's design as the template since they solved several problems the legacy version left open (prompt injection, false-positive recovery, overeager-action blocking vs. pure blocklists).

How Claude Code "auto mode" works

From the Anthropic writeup and the permissions docs:

Two-layer defense:

  1. Input layer — prompt-injection probe. Server-side probe scans tool outputs (file reads, web fetches, shell output, MCP results) before they enter the agent's context. When content looks like an injection attempt it prepends a warning telling the agent to treat the content as suspect.
  2. Output layer — transcript classifier. Runs on Sonnet 4.6. Evaluates each tool call before it executes. Two stages: a fast single-token yes/no filter tuned to err on the side of blocking (8.5% FPR, 6.6% FNR on real traffic), followed by a chain-of-thought stage that runs only on flagged actions (0.4% FPR, 17% FNR end-to-end).

Tiered short-circuiting (most actions never hit the classifier):

  • Tier 1: built-in safe-tool allowlist (reads, grep, glob, todo, plan) + user allow rules. On entering auto mode, blanket shell rules and wildcarded script interpreters (python, node, ruby, npm run *) are dropped — the whole point of the classifier is to see those.
  • Tier 2: in-project file edits are allowed without classifier call (reviewable via git).
  • Tier 3: classifier only sees shell commands, web fetches, external tool integrations, subagent spawns, out-of-project filesystem operations.

Reasoning-blind classifier. The classifier only sees user messages and bare tool-call payloads. Assistant prose and tool outputs are stripped so the agent cannot talk the classifier into a bad decision ("this is safe because the user implicitly approved it earlier"). Also makes prompt injection structurally harder since the classifier never reads poisoned content.

Customizable classifier policy — three prose slots:

  • autoMode.environment — prose descriptions of trusted infrastructure (GitHub orgs, S3 buckets, internal domains). Anything outside is treated as potential exfiltration.
  • autoMode.allow — exceptions to block rules (e.g., "deploying to staging namespace is allowed").
  • autoMode.soft_deny — block rules beyond the defaults (20+ ship out of the box, covering destroy/exfiltrate, degrade security posture, cross trust boundaries, bypass review).

Explicit user intent overrides soft_deny — if the user's message directly describes the action ("force-push this branch"), it's allowed even if a block rule matches.

Deny-and-continue semantics. Denial is returned to the agent as a tool result with instruction to "find a safer path, don't route around." 3 consecutive or 20 total denials in a session escalate to the human (or terminate in headless mode). This makes false positives survivable — without it a 0.4% FPR would be a serious usability problem over long runs.

CLI surface: claude auto-mode defaults / config / critique.

How legacy kilocode "gatekeeper" worked

Full source: kilocode-legacy/src/core/assistant-message/kilocode/gatekeeper.ts (388 LOC). Ran only when yoloMode was enabled and yoloGatekeeperApiConfigId pointed to an API profile.

Flow (evaluateGatekeeperApproval, lines 19-140):

  1. Load gatekeeper model profile from user's configured API configs.
  2. Build a prompt containing toolName + params + workspace dir + git repo path + per-file git tracked/untracked status for paths extracted from bash commands (extractFilePathsFromCommand, lines 188-230).
  3. Stream response from the chosen model. Parse first word — yes/approve/allow → approved, else denied.
  4. Emit 🛡️ Gatekeeper ✅ approved **toolName** ($0.0002) chat message (lines 123-131).
  5. On any error: default to approve. (line 138). This is a significant safety gap vs. Claude Code which fails closed.

Pre-approved tools (bypass the model entirely, lines 285-292): read_file, list_files, search_files, codebase_search, list_code_definition_names, update_todo_list.

System prompt (lines 310-381): ~70 lines of hand-written rules split into 7 "core principles":

  1. Read operations safe.
  2. Task management (todos) safe.
  3. Writes within workspace generally safe.
  4. Deletion depends on git recoverability.
  5. Commands evaluated by intent and scope (ls, cat, git status safe; sudo denied; /etc, /usr, /bin denied).
  6. MCP tools: read-only safe, writes evaluated.
  7. System integrity paramount — no sudo, no system dirs, no public network exposure.

Wire-up:

  • kilocode-legacy/src/core/assistant-message/presentAssistantMessage.ts:697-712 — YOLO short-circuit calls evaluateGatekeeperApproval before auto-approving.
  • Settings: yoloGatekeeperApiConfigId: z.string().optional() at packages/types/src/global-settings.ts:77.
  • UI: AutoApproveSettings.tsx:464-503 — "No gatekeeper (approve all)" select populated from listApiConfigMeta.
  • Tests: src/core/assistant-message/kilocode/__tests__/gatekeeper.test.ts (~690 lines).

Current Kilo CLI state

  • packages/opencode/src/permission/index.ts — rule-based permissions {permission, pattern, action}; no LLM evaluation.
  • packages/opencode/src/kilocode/permission/routes.ts — POST /permission/allow-everything wildcard approve, no guardrails.
  • packages/opencode/src/kilocode/permission/config-paths.ts — forces ask on edits to .kilo/, .opencode/, AGENTS.md, etc.
  • TUI command Enable auto-approve mode at src/kilocode/cli/cmd/tui/app.tsx:156-176.
  • VS Code settings UI at packages/kilo-vscode/webview-ui/src/components/settings/AutoApproveTab.tsx — static allow/ask/deny matrix.

No feature evaluates tool calls with a model. Legacy migration (packages/kilo-vscode/src/legacy-migration/migration-service.ts:589-722) drops yoloGatekeeperApiConfigId silently.

Requirements

1. Classifier hook in the permission pipeline

Hook into Permission.ask (packages/opencode/src/permission/index.ts:190-239) so that, when a rule would auto-approve a call and the classifier is enabled, it first consults the classifier. Three possible outcomes:

  • Classifier approves → proceed silently as today.
  • Classifier denies → return a tool error to the agent with the denial reason (deny-and-continue). Do not prompt the human.
  • Classifier errors → fail closed (fall back to ask), not open. This diverges from the legacy gatekeeper which approved on error, following Claude Code's model.

Applies to bash, webfetch, external_directory, MCP tools, subagent spawns, edits outside the project. Does not apply to the built-in safe-tool allowlist (read, grep, glob, list, codesearch, websearch, todoread) or to in-project file edits (short-circuit before classifier call, matching Claude Code's Tier 1/2).

2. Two-stage classifier

Copy Claude Code's design verbatim:

  • Stage 1: fast single-token yes/no on a small model (e.g., Haiku / claude-haiku-4.6 or the gatekeeper model of the user's choice). Prompt ends with "err on the side of blocking." Emits a single token.
  • Stage 2: runs only on stage-1 blocks. Same prompt template with a different final instruction asking for chain-of-thought reasoning. Most tokens are prompt-cache hits from stage 1.

Single-stage is acceptable as v1 if two-stage adds too much scope; the config shape should be forward-compatible.

3. Reasoning-blind inputs

The classifier sees only:

  • User messages from the conversation.
  • Bare tool-call payload (name + params).

It does not see assistant prose or previous tool results. This is both a prompt-injection defense (tool results are where hostile content enters) and an anti-rationalization defense (agent can't talk the classifier into a bad call). Legacy gatekeeper did not do this and should not be copied blindly.

4. Configurable policy — three prose slots

New config block permission.classifier with:

  • model — string, e.g., claude-haiku-4.6 or a user-defined provider/model.
  • environment — string[] — natural-language description of trusted infra. Defaults to "the current working directory and git remotes."
  • allow — string[] — exceptions to the block rules. Ships with conservative defaults (install packages declared in manifests, push to session working branch, standard credential flows).
  • soft_deny — string[] — block rules. Port and adapt Claude Code's 20+ default rules covering destroy/exfiltrate, degrade security posture, cross trust boundaries, bypass review.

Replacing allow or soft_deny replaces the whole list (copy-the-default-then-edit model, not merge). Surface a kilo classifier defaults / config / critique set of commands so users can inspect and validate.

5. Deny-and-continue with escalation backstop

  • A classifier denial returns as a tool error the agent can react to, with the reason text. Do not halt the session.
  • Track consecutiveClassifierDenials and totalClassifierDenials on the Session. At 3 consecutive or 20 total denials, halt and escalate to the human (or in headless kilo run mode, terminate with non-zero exit and clear error).
  • Counters reset on any user turn.

6. Tiered short-circuit

Before calling the classifier:

  • Safe-tool allowlist (hardcoded): read, grep, glob, list, codesearch, websearch, todoread, todowrite, lsp. These already short-circuit in many cases; formalize the list.
  • In-project edits: edit operations targeting paths inside the workspace root (excluding the existing config-paths.ts protected set) skip the classifier. Reviewable via git.
  • On enabling classifier mode: drop blanket allow rules known to grant arbitrary code execution — bash: *: allow, wildcarded interpreter rules (python *, node *, bun *, npm run *, etc.), and task rules without specifiers. Narrow rules ("allow running prettier") carry over. This prevents users from bypassing the classifier via pre-existing broad allow rules.

7. Prompt-injection probe (phase-2)

Server-side probe that scans tool output before it enters the agent's context. When content looks like injection ("ignore previous instructions," curl-pipe-to-bash patterns, etc.) prepend a warning to the tool result. Can be its own small classifier call or a fast heuristic pass first.

Phase-2 because the transcript classifier alone already closes the highest-impact attack paths; the probe is defense in depth.

8. UI surface

  • VS Code sidebar: the auto-approve indicator bar (tracked separately in other issues) should surface classifier state — off / enabled / paused — with model name visible on hover.
  • Classifier denials and approvals should be marked inline in the conversation similar to legacy's 🛡️ Gatekeeper ✅ approved **toolName** ($0.0002) message, including model cost per evaluation.
  • TUI: /classifier command to view status, toggle, and see recent denials.

9. Migration

Update packages/kilo-vscode/src/legacy-migration/migration-service.ts:589-722 to:

  • Map yoloMode: true + yoloGatekeeperApiConfigId: <id> → permission.classifier = { model: <resolved model>, environment: [...defaults] }.
  • Map yoloMode: true with no gatekeeper → warn the user that their old behavior (approve all on error) is no longer default, and offer to either enable the classifier with a default model or fall back to allowEverything global rule.

Out of scope

  • Making the classifier decision authoritative (overriding explicit user deny rules). User config always wins. Classifier only gates what would otherwise auto-approve.
  • Porting the legacy yoloMode toggle itself. This issue is about the classifier, not about bulk auto-approve with no guardrails — that already exists via allowEverything.
  • Re-implementing Claude Code's server-side prompt-injection probe exactly. We can start with a local heuristic / small model pass.
  • Custom model plumbing. Reuse the existing provider/model selection infrastructure used by agent.model.
  • Loop/cost caps and the quick-toggle indicator bar — separate concerns that benefit from classifier mode but don't depend on it.

References

Claude Code auto mode:

  • https://www.anthropic.com/engineering/claude-code-auto-mode (Mar 25, 2026)
  • https://docs.anthropic.com/en/docs/claude-code/permissions#configure-the-auto-mode-classifier

Legacy kilocode gatekeeper (/Users/marius/Documents/git/kilocode-legacy/):

  • src/core/assistant-message/kilocode/gatekeeper.ts:19,72-140 — evaluateGatekeeperApproval
  • src/core/assistant-message/kilocode/gatekeeper.ts:239-387 — buildGatekeeperPrompt + system prompt
  • src/core/assistant-message/kilocode/gatekeeper.ts:285-292 — pre-approved read-only tools
  • src/core/assistant-message/kilocode/gatekeeper.ts:147-180 — git-tracked detection for bash file paths
  • src/core/assistant-message/presentAssistantMessage.ts:697-712 — wire-up under YOLO short-circuit
  • src/core/assistant-message/kilocode/__tests__/gatekeeper.test.ts — test coverage patterns
  • packages/types/src/global-settings.ts:77 — setting schema
  • webview-ui/src/components/settings/AutoApproveSettings.tsx:464-503 — gatekeeper model picker UI

Current Kilo CLI:

  • packages/opencode/src/permission/index.ts:190-239,353-396 — Permission.ask, allowEverything
  • packages/opencode/src/kilocode/permission/routes.ts:14-82 — HTTP route
  • packages/opencode/src/kilocode/permission/config-paths.ts — protected paths
  • packages/opencode/src/kilocode/cli/cmd/tui/app.tsx:156-176 — TUI auto-approve command
  • packages/kilo-vscode/webview-ui/src/components/settings/AutoApproveTab.tsx — settings matrix
  • packages/kilo-vscode/src/legacy-migration/migration-service.ts:589-722 — existing migration

marius-kilocode avatar Apr 17 '26 14:04 marius-kilocode

Seems to be a duplicate of #7684, although this is a much more extensive plan writeup.

shssoichiro avatar Apr 24 '26 02:04 shssoichiro

Feel free to assign this issue to me. As discussed in Discord, I'm planning to work on implementing this. Since this is a large feature, I'll try to PR it in small chunks behind a feature flag.

shssoichiro avatar May 14 '26 04:05 shssoichiro

+1 to this. This is exactly the missing middle ground between constant permission prompts and unsafe YOLO/allow-everything behavior.

One additional reference worth considering is Codex’s guardian/auto-review implementation:

  • https://github.com/openai/codex/tree/main/codex-rs/core/src/guardian
  • https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/policy.md
  • https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/policy_template.md
  • https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/review.rs
  • https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/review_session.rs

The part I’d especially like to see in Kilo is a harness-side reviewer that considers the current session/chat context, including permissions explicitly granted by the direct user earlier in the session, while still refusing to treat tool output, web content, file content, or prompt-injection text as permission grants.

The current static rule-map approach helps, but it becomes hard to maintain safely once users are hand-curating long allow/deny lists with token-matching edge cases, shell differences, and injection-specific patterns. A reviewer/classifier layer would make routine, clearly authorized work much less click-heavy while keeping hard safety tripwires in place.

Ideally this should apply to the full permission surface, not only bash commands: shell, file edits/writes, webfetch/network access, MCP tools, subagent/task spawns, and external-directory access.

I’d also like the reviewer/classifier model to be configurable independently from the main coding model. For local-first setups, that means I could run the main agent on one model while pointing the approval reviewer at another provider, including a local/OpenAI-compatible endpoint on another machine, e.g. http://192.168.x.x:port/v1, or a frontier API model if preferred. The reviewer should not have to be the same model/provider as the working agent.

remesis avatar May 20 '26 09:05 remesis

Useful direction. I would be careful to keep the classifier decision bound to the exact action context, not just the command string.

For example: command, cwd, env boundary, files/globs touched if known, MCP server/tool identity for non-shell tools, and whether the step is read-only or state-changing. Otherwise a learned allow rule can drift from git status into a nearby mutating command.

A durable decision object like {action, context_hash, decision: allow|ask|block, reason, policy_version} would also make retries and user reports easier without prompting on every safe command.

oleg-bk avatar May 27 '26 13:05 oleg-bk

@marius-kilocode Opened a draft PR taking a first pass at this: #11619.

Approach (following the auto-mode design discussed here):

  • Pluggable ClassifierProvider; default uses the user's configured model via the AI SDK (single-pass <block>yes/no).
  • Hooks Permission.ask only on the would-auto-approve path: block → deny-and-continue (ClassifierDeniedError, surfaces as a tool error, no halt); classifier error/escalation → fail closed (human ask). Never overrides an explicit user deny/ask.
  • Reasoning-blind transcript (user text + assistant tool calls only), safe-tool allowlist short-circuit, per-session denial counters (3-consecutive / 20-total, reset each user turn), and a classifier config block with copy-then-edit environment/allow/soft_deny slots.

Deferred to follow-ups: the local/SaaS HTTP backends, the phase-2 input-layer injection probe, "drop blanket-allow rules on enable", VS Code/TUI surfaces, and the legacy yoloGatekeeperApiConfigId migration.

Marked draft — opening for early feedback on the integration approach (notably: gating inside Permission.ask vs. at the session/tools.ts call site).

thomaslwang avatar Jun 24 '26 03:06 thomaslwang

@thomaslwang thanks! @shssoichiro had some work going in this direction as well with https://github.com/Kilo-Org/kilocode/pull/10267

marius-kilocode avatar Jun 24 '26 08:06 marius-kilocode

We would need to find a nice way to integrate it into the auto-approve functionality. We are about to ship sandboxing, so I am not sure yet how we best fit gatekeeper in there, yet.

marius-kilocode avatar Jun 24 '26 08:06 marius-kilocode

@marius-kilocode thanks for the pointers — happy to converge rather than fork the effort. A few things to help us pick a direction:

How this relates to #10267

Both #10267 and #11619 implement the same #9138 spec — they're complementary, not competing:

  • #10267 is the config contract (schema, behind an experimental flag), deliberately kept small.
  • #11619 is the runtime: the actual interception point in Permission.ask, deny-and-continue, reasoning-blind transcript, and the per-session escalation backstop.

So the cleanest path is probably: land the config schema first, then #11619 wires it up — I'm glad to rebase #11619 onto whatever shape you settle on. The kilo-auto/balanced default works for me. Two decisions only you can make:

  1. Naming/shape. I'd lean toward a top-level classifier block over gatekeeper:

    • It describes what it is and matches the "auto-mode classifier" vocabulary; gatekeeper was the legacy extension's name for the old YOLO-path feature — and you've already noted the current comparison point is Auto Approve, not YOLO, so the name carries baggage we'd rather not re-import.
    • Keeping it top-level (classifier.*, not permission.classifier) sidesteps the nesting-confusion concern raised in #10267 — permission stays purely about static overrides.
    • We can keep gatekeeper as a back-compat alias for users migrating from the legacy extension.

    That said, naming is your call — I'll match whatever you pick.

  2. The one real design fork: context_aware vs reasoning-blind. This isn't just a UX knob — it's a security boundary, so worth being deliberate.

    The point of auto mode isn't only to approve user-initiated bash commands; it also has to defend against indirect prompt injection that arrives through tool results (file reads, web fetches, MCP output). That's the whole reason Claude Code's classifier is reasoning-blind: it sees only user messages + the bare tool call, never the agent's prose or any prior tool output. The moment you feed session context / tool output into the classifier (context_aware: true, Codex-style), you reopen exactly the channel attackers use — injected content can talk the classifier into approving its own follow-up action, and the agent can rationalize a call from earlier "implicit" approval.

    So my recommendation is reasoning-blind as the default, with context_aware available as an opt-in for users who want fewer prompts and accept the weaker injection posture. But the default is a product call — your call.

Integration with Auto Approve (not YOLO)

The gate sits on the would-auto-approve path only: when an Auto Approve rule would auto-approve a call, the classifier runs first → allow (proceed silently) / block (deny-and-continue, returned to the agent as a tool error, no human prompt) / unavailable (fail closed → fall back to a human ask). It never overrides an explicit user deny/ask. So it's a layer on top of Auto Approve, not a replacement — and it means users stop hand-curating long allow/deny lists (the maintainability problem @oleg-bk and @remesis raised).

How it fits with sandboxing — could you share the sandbox model?

I don't think these conflict at all — they're two different layers of agent-runtime security, and neither solves the other's problem. Claude Code ships both (the SRT sandbox runtime and the auto-mode classifier) for exactly this reason:

  • Sandbox = containment (OS-level least privilege: filesystem, network namespace — limits what a process can do, and is the backstop for whatever the classifier wrongly allows).
  • Classifier = semantic authorization + injection defense (decides whether an action should run, by intent + policy).

A sandbox can't make the calls that actually matter here, because they're semantic, not OS-level:

  • It can't tell git push to a feature branch (fine) from git push --force to main (not) — both are just "network + git".
  • It can't tell npm install from curl secrets | POST evil.com once the agent has any network (which it usually needs) — distinguishing trusted vs exfil targets is a policy decision.
  • It does nothing about indirect prompt injection via tool results — that's a content/decision problem.

Conversely the classifier has a nonzero FPR/FNR, so the sandbox is the containment backstop. They're defense-in-depth. Concretely they compose well: in-sandbox in-project edits short-circuit the classifier (cheap), and the classifier focuses on the Tier-3 surface that escapes the sandbox (network egress, out-of-sandbox writes, MCP, subagent spawns).

Could you share the rough sandbox model you're shipping (what it isolates — fs / network / process — and whether it's per-tool or per-session)? I'll align #11619's short-circuit tiers to it so they stack cleanly instead of double-gating.

Modular policy — the OSS angle

The differentiator vs Claude Code's closed auto-mode: the backend/model and the full prompt are pluggable and inspectable, not tied to one vendor. Same three prose policy slots, but as plain config:

{
  "classifier": {
    "enabled": true,
    // defaults to kilo-auto/balanced; override with any provider or a local endpoint
    "model": "kilo-auto/balanced",
    "environment": [
      "Trusted git remotes: github.com/acme-corp/*",
      "Trusted deploy target: the 'staging' k8s namespace only"
    ],
    "allow": [ "Deploying to the staging namespace.", "Pushing to any feature/* branch." ],
    "soft_deny": [ "...the shipped defaults...", "terraform apply against any prod workspace.",
                   "Reading or printing secrets/ or *.pem." ]
  }
}

The classifier backend is vendor-agnostic — backend: "http" POSTs the contract to any URL you point it at (a local model or a hosted service), so the reviewer model is fully independent of the coding model, including a local/OpenAI-compatible endpoint — which is what @remesis asked for.

I've got a working draft up (#11619) and I'm keen to move quickly since the issue's been open a while. What would help most — me rebasing onto the config schema, or a short sync with @shssoichiro to split the runtime vs config work?

thomaslwang avatar Jun 24 '26 15:06 thomaslwang

Update: routing the gatekeeper through OpenGuardrails (OGR)

Heads up on a direction change for #11619. Rather than ship a bespoke command-approval classifier, we're making the gate delegate to OpenGuardrails (OGR) — the open standard + neutral benchmark for AI agent safety & security. And we're collapsing the ClassifierProvider backend enum (OwnModel / og-local / og-saas) into a single OGR integration: Kilo integrates once against the OGR contract, and where the verdict is actually produced becomes OGR policy config, not a Kilo-level backend type.

What stays the same — none of the integration work in #11619 is wasted. The hook point (gate the would-auto-approve path, never override an explicit deny/ask), the reasoning-blind transcript, the tiered safe-tool short-circuit, and the fail-closed escalation backstop all remain. OGR only replaces how the verdict is produced.

What changes — instead of a single-pass <block>yes/no against the user's model, the gate emits a GuardEvent and consumes a Verdict (allow / block / require_approval):

  • require_approval maps cleanly onto the existing fail-closed → human ask path — it becomes a first-class verdict, not just an error fallback.
  • Composition — multiple detectors combine via deny-wins or quorum, instead of one prompt deciding everything.
  • Provenance-aware — the verdict can key on untrusted input → privileged action (the dangerous combination), not just the command string, which is the failure mode the legacy gatekeeper and pure blocklists both missed.
  • Declarative policy — one policy.json (allow / deny / require_approval, egress allowlist, secret-path rules) instead of logic baked into the provider. This is also where the PR's environment / allow / soft_deny slots move. Reviewable, diffable, and measurable on the neutral benchmark so the gate's FPR/FNR is a number, not a vibe.
  • The backend enum goes away. "Local model vs hosted" is an OGR transport/detector detail, and "use your own model as the judge" is just one OGR LLM-judge detector — not separate Kilo backends. Kilo's classifier config shrinks to roughly { enabled } plus a pointer to the OGR policy.

Why this is worth it for Kilo specifically: this isn't a Kilo-only mechanism. The same enforcement point is going into opencode upstream via anomalyco/opencode#34329 (a plugin gate in `PermissionV2` for the `allow→ask` path, tracking #34327). Both route through OGR, so the gatekeeper here shares one standard, one policy model, and one benchmark with the upstream runtime rather than being a one-off.

Refs for the model and policy format:

  • Standard / spec: https://github.com/openguardrails/openguardrails-spec
  • Agent-facing guide + skill: https://openguardrails.com/agent/
  • Benchmark: https://github.com/openguardrails/openguardrails-bench

I'll update #11619 to replace the og-*/OwnModel backends with the single OGR integration and keep this thread posted.

thomaslwang avatar Jun 29 '26 02:06 thomaslwang

To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please reopen it or create a fresh new one.

github-actions[bot] avatar Aug 28 '26 09:08 github-actions[bot]

This was closed by the stale bot rather than by a decision, and nothing has landed since — #10267 and #11619 went the same way. I've opened #13893 as an implementation; could this be reopened so the PR has a home?

One deliberate divergence from the spec, flagged up front: the model is not in the decision path. A deterministic layer decides first and the LLM is only a narrowing stage that can turn a reviewable ask into an allow for the current call — it never sees a deny and cannot widen what the ruleset already permits. That follows the review comment here about binding the decision to the action's context rather than the command string, and it means the feature still works with no model bound at all, which is the state most installs will be in.

Requirements 1, 2, 3, 5, 6 and 8 are covered — 3 more strictly than specced, since the reviewer sees parsed argv, path facts and containment only. The prose config slots, the injection probe and the legacy migration are not; the mapping is in the PR.

On fitting it with sandboxing: containment is an input to the decision rather than a competitor. The facts are re-read after the reviewer answers, so a sandbox toggled mid-review cannot be the ground an approval was granted on.

Hellcake avatar Sep 07 '26 18:09 Hellcake