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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Enclawed Code: Deterministic Control of Every Tool Call of an Unmodified Claude Code

Alfredo Metere
2 links
Zenodo (CERN European Organization for Nuclear Research)
Security and Verification in Computing
article

Enclawed Code: Deterministic Control of Every Tool Call of an Unmodified Claude Code

Alfredo Metere
article en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
St. Elizabeth Hospital in Enumclaw (US)
Peace, justice, and strong institutions
Security and Verification in Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Enclawed Code: Deterministic Control of Every Tool Call of an Unmodified Claude Code — Alfredo Metere · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS