Knowing Is Not Acting: Language Model Agents Know What Their Commands Do and Break the Rule Anyway

Agents built on language models run shell commands that cause effects their users forbade, and often say so only afterward. We ask whether the model knows what its command does and fails to use that knowledge while acting or does not know. Effects are labeled only by running each command in a sandbox (system-call traces, filesystem diffs, a fake cloud endpoint and planted canary secrets), never by a model judge. We study the first action of six open models (Qwen3 0.6B to 8B, Llama-3.2-1B and Llama-3.1-8B) on 130 tasks under a rule that forbids, allows or does not mention the task’s natural effect. For every rule break, we ask the same model, outside the episode, whether the command has the effect, whether that goes against the rule, and whether it should run. At Qwen3-4B and Qwen3-8B, the two models whose answers pass our readability checks, .589 [.503, .675] and .585 [.479, .694] of breaks pass every step: the model judges that the command has the forbidden effect, that this breaks the rule and that it should not run, and it wrote the command anyway. Most of the other breaks fall into a few effect classes that the model systematically misjudges. Forbidding an effect moves the first action mainly when the task uses the rule’s own words (Qwen3-4B) or needs at most one small step of command knowledge (Qwen3-8B). Asking the model at the moment of action which effects its command has and whether to run it lowers the share of breaking first actions under the forbidding rule by .254 (Qwen3-4B) and .196 (Qwen3-8B), absolute, and leaves the allowing rule unchanged, yet when the model names the forbidden effect itself, it still runs about half the time. Training a pre-action note did not bring this knowledge onto the model’s own path.

Authors

Publication Details

Journal
Preprints.org
Published
2026-12-02
DOI
https://doi.org/10.20944/preprints202612.0289.v1
Primary Topic
Adversarial Robustness in Machine Learning
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Knowing Is Not Acting: Language Model Agents Know What Their Commands Do and Break the Rule Anyway

Sumedh Rasal
Preprints.org
Adversarial Robustness in Machine Learning
preprint

Knowing Is Not Acting: Language Model Agents Know What Their Commands Do and Break the Rule Anyway

Sumedh Rasal
preprint en

Abstract

Agents built on language models run shell commands that cause effects their users forbade, and often say so only afterward. We ask whether the model knows what its command does and fails to use that knowledge while acting or does not know. Effects are labeled only by running each command in a sandbox (system-call traces, filesystem diffs, a fake cloud endpoint and planted canary secrets), never by a model judge. We study the first action of six open models (Qwen3 0.6B to 8B, Llama-3.2-1B and Llama-3.1-8B) on 130 tasks under a rule that forbids, allows or does not mention the task’s natural effect. For every rule break, we ask the same model, outside the episode, whether the command has the effect, whether that goes against the rule, and whether it should run. At Qwen3-4B and Qwen3-8B, the two models whose answers pass our readability checks, .589 [.503, .675] and .585 [.479, .694] of breaks pass every step: the model judges that the command has the forbidden effect, that this breaks the rule and that it should not run, and it wrote the command anyway. Most of the other breaks fall into a few effect classes that the model systematically misjudges. Forbidding an effect moves the first action mainly when the task uses the rule’s own words (Qwen3-4B) or needs at most one small step of command knowledge (Qwen3-8B). Asking the model at the moment of action which effects its command has and whether to run it lowers the share of breaking first actions under the forbidding rule by .254 (Qwen3-4B) and .196 (Qwen3-8B), absolute, and leaves the allowing rule unchanged, yet when the model names the forbidden effect itself, it still runs about half the time. Training a pre-action note did not bring this knowledge onto the model’s own path.

Preprints.org
Adversarial Robustness in Machine Learning
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