Characterizing LLM Agent Behaviors in Module Shadowing Environments
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
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. 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.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 14 of its 19 references that are in the map. Submitted 29 Oct 2026.
Builds on
14 of 19 references.
Closest ancestors · 3
Same direction, newest first
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents12 Nov
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
Other references · 11
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 2,069
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,638
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 889
- 2025Large Language Models Often Know When They Are Being Evaluatedcited by 162
- 2025Establishing Best Practices for Building Rigorous Agentic Benchmarkscited by 137
- 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluationcited by 125
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMscited by 72
- 2020Backstabber's Knife Collection: A Review of Open Source Software Supply Chain Attackscited by 67
- 2022Taxonomy of Attacks on Open-Source Software Supply Chainscited by 62
- 2026Log analysis is necessary for credible evaluation of AI agentscited by 15
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026SINGED: Correct Outputs Do Not Certify Safe Execution in LLM Agents
- 2026You Told Me to Do It: Measuring Instructional Text-induced Private Data Leakage in LLM Agents
- 2026LLM Agents Can Easily Tamper With Their Own Traces
- 2026From Agent Traces to Trust: A Survey of Evidence Tracing and Execution Provenance in LLM Agents
- 2026AgentTrustCI: Build-Time Policy, Grounding, and Trajectory Tests for Java LLM Agents
- 2026Safeguarding LLM Agents against Long-Horizon Threats via Shadow Memory
- 2026Recognition Without Enforcement: Configuration-Dependent Failures in LLM Agent Instruction Arbitration and External Control
- 2026When Tool Outputs Become Commands: Separating Action Induction from Runtime Authorization in Tool-Augmented LLM Agents