Enclawed Code: How Deterministic Security Layers Harden Claude Code Agent Execution
Enclawed Code wraps Claude Code in a deterministic security layer that checks every action before execution. The core insight: stop asking the LLM to judge safety. Instead, enforce boundaries at the infrastructure layer using a fixed rule that asks one question: can this action be undone? The project ships as open source with a companion research paper showing zero harmful actions passed and zero…
Enclawed Code is a security layer that wraps Claude Code to enforce deterministic safety measures before execution. This approach shifts security from the LLM to infrastructure, removing vulnerabilities like prompt injection, context confusion, and permission fatigue. By intercepting every action before execution, it ensures reversibility, allowing irreversible actions to trigger human approval prompts.
The architecture includes a security key unlock, action interception, reversibility checks, and routing decisions. Reversible actions, such as file reads, read-only commands, and tests, execute in sealed spaces with copy-on-write file systems and restricted network access. Irreversible actions like system configuration changes and package installations require human approval.
Hardware-rooted attestation can further enhance security. The research paper demonstrates that Enclawed Code blocks 93 embedded attacks in various Claude models without false positives and reduces approval prompts by 7.7x. It is intended for local development, regulated environments, and red team exercises, but not for fully autonomous agents or high-throughput batch processing.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to