Characterizing LLM Agent Behaviors in Module Shadowing Environments

Shuai Yang, Enmeng Lu, Jinyu Fan, Gongce Cao, Yu Chen +5 more
10/29/2026
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

LLM agents operating in untrusted workspaces face the risk of untrusted code execution during routine tasks, yet final reports and workspace states alone cannot reliably establish whether execution occurred. We introduce an evaluation framework that codes observation, reasoning, execution, and response behaviors from agent trajectories and aligns them with independent environmental records to reconstruct execution histories and verify final reports.

Show full abstract

We apply this framework to module shadowing, in which a local file is loaded in place of a trusted module during import, enabling untrusted code execution without adversarial prompts. Across 90 trials with 15 models, the payload executed in 51% of direct shadowing trials and 87% of indirect shadowing trials. Even explicit recognition of the shadowing mechanism did not ensure prevention, as the payload ran in 10 of the 29 trials with recorded recognition. These failures were often omitted from final reports, as 49 of the 62 triggered trials ended without mention of the security issue. Three reports even denied execution, including one from a trial in which independent logs recorded 19 payload executions. Final workspace states also obscured prior execution when agents deleted or overwrote the payload marker in 10 triggered trials. These findings demonstrate that combining behavioral coding with independent environmental auditing enables rigorous and transparent evaluation of agent safety.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yang2026characterizing,
  title  = {Characterizing LLM Agent Behaviors in Module Shadowing Environments},
  author = {Shuai Yang and Enmeng Lu and Jinyu Fan and Gongce Cao and Yu Chen and Jiawei Xie and Feifei Zhao and Zhangsheng Wang and Yongyu Jiang and Yi Zeng},
  year   = {2026},
  eprint = {2610.40716},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.40716v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.40716.svg)](https://codeofpaper.com/paper/2610.40716)

Discussion