mlsanityData to 14 Oct 2026

CARE: Pre-Execution Command Verification for Shell-Executing LLM Agents

arXiv 2607.21642 ↗First posted 21 Jul 2026cs.CRcited by 2

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

Large Language Model (LLM) agents are increasingly used for coding and terminal automation, making shell-command dispatch a high-stakes runtime control point. We study command-level pre-execution mediation for individual shell commands produced by LLM agents under bounded path context. Existing safeguards remain limited: generic guardrails do not model shell structure in sufficient detail, always-on LLM judges are relatively costly and variable, and shell parsers do not directly prevent harmful execution. We present CARE (Canonicalization, Attribution, and Resolution Engine), a shell-specific, static-first verifier for individual shell commands before execution. CARE canonicalizes generated commands into stable verification targets, derives deterministic evidence over syntax, command semantics, path context, and provenance-backed risk patterns, and escalates only underdetermined cases to an LLM judge. This design keeps the common case fast, reproducible, and auditable while reserving neural adjudication for borderline commands. On the balanced main split, CARE reaches 85.64% F1 with a 0.91% false-positive rate at 2.32 ms mean latency. When deployed in its static enforcement profile, CARE retains 84.99% F1 at 0.34 ms and reduces realised harm on RedCode-gen to 37.33%. Across external-generalization tests and controlled Docker-sandbox execution, these profiles expose a practical trade-off between benign recovery, false-positive burden, latency, and harm reduction. Overall, command-level shell mediation can reduce dispatch-boundary risk for LLM agents while preserving most benign workflows.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 6 of its 33 references that are in the map. First posted on arXiv 21 Jul 2026.

Builds on

6 of 33 references.

Closest ancestors · 5

Same direction, newest first

  1. 2026Safeguarding LLM Agents against Long-Horizon Threats via Shadow Memory4 May
  2. 2026SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deployment15 Apr
  3. 2026ClawGuard: A Runtime Security Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection13 Apr
  4. 2026Mind the GAP: Text Safety Does Not Transfer to Tool-Call Safety in LLM Agents18 Feb
  5. 2024Agent-SafetyBench: Evaluating the Safety of LLM Agents19 Dec

Other references · 1

  1. 2026Don't Let the Claw Grip Your Hand: A Security Analysis and Defense Framework for OpenClawcited by 29

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Look Before You Leap: Pre-Action Verification for LLM Agents
  2. 2026From Natural Language Policies to Executable Obligations: A Verification Harness for Dependable In-Car LLM Agents
  3. 2026One Goal, Many Commands: Characterizing Denylist Fragility in AI Agents
  4. 2026Formal Skill: Programmable Runtime Skills for Efficient and Accurate LLM Agents
  5. 2026KAIJU: An Executive Kernel for Intent-Gated Execution of LLM Agents
  6. 2026LLM-as-Code: Agentic Programming for Agent Harness
  7. 2026Evaluating Implicit Regulatory Compliance in LLM Tool Invocation via Logic-Guided Synthesis
  8. 2026NOMOS: Compiling Written Policies into Statically Verified Tool-Call Gates for LLM Agents