Enclawed Code: Deterministic Control of Every Tool Call of an Unmodified Claude Code
Coding agents run commands, edit files and call tools on a developer's machine, steered by text anyone can plant in a repository, web page or tool result. This work aims to demonstrate that deterministic gating should always be the foundation of agent security: no one should lose data because a language model misread a request, let alone because an attacker steered it. Enclawed Code, an open-source launcher, runs the user's unmodified Claude Code inside Enclawed, where a fixed rule decides each tool call by its effect and reversibility before it runs. The paper tests the hypothesis that this rule stops every harmful call, puts every legitimate irreversible call to a person, stops no harmless one, and asks a person less often and more consistently than permissions keyed to command text. In 2484 live runs on 3 models, attacks took effect against native Claude Code in 11.6% of runs in default mode and 34.8% in bypassPermissions. On the same tasks, in every mode, Enclawed Code let 0 harmful calls run, ran 0 irreversible ones unapproved, stopped 0 harmless ones, needed a person 7.3 times less often in default mode, and gave mixed decisions to 0.1% of actions, against 12.1%: the hypothesis is supported. A hardware root, the Enclaweder, changes no shared decision and adds accountability that even root cannot forge. A complete defense combines deterministic and detection-based controls; where actions are critical, the deterministic gate, best on every measured axis, is indispensable.
Authors
- Alfredo Metere (ORCID: https://orcid.org/0000-0003-0237-7250)
Institutions
- St. Elizabeth Hospital in Enumclaw (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-25
- DOI
- https://doi.org/10.5281/zenodo.24524917
- Primary Topic
- Security and Verification in Computing
- Type
- article
- Field-Weighted Citation Impact
- 0.00