Reflection-Driven Control for Trustworthy Code Agents
On the map: LLM agents and tool use → Agent threats, guardrails and governance
also in 1 more
Abstract (arXiv)
Contemporary large language model (LLM) agents are remarkably capable, but they still lack reliable safety controls and can produce unconstrained, unpredictable, and even actively harmful outputs. To address this, we introduce Reflection-Driven Control, a standardized and pluggable control module that can be seamlessly integrated into general agent architectures. Reflection-Driven Control elevates "self-reflection" from a post hoc patch into an explicit step in the agent's own reasoning process: during generation, the agent continuously runs an internal reflection loop that monitors and evaluates its own decision path. When potential risks are detected, the system retrieves relevant repair examples and secure coding guidelines from an evolving reflective memory, injecting these evidence-based constraints directly into subsequent reasoning steps. We instantiate Reflection-Driven Control in the setting of secure code generation and systematically evaluate it across eight classes of security-critical programming tasks. Empirical results show that Reflection-Driven Control substantially improves the security and policy compliance of generated code while largely preserving functional correctness, with minimal runtime and token overhead. Taken together, these findings indicate that Reflection-Driven Control is a practical path toward trustworthy AI coding agents: it enables designs that are simultaneously autonomous, safer by construction, and auditable.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 9 of its 22 references that are in the map. First posted on arXiv 22 Dec 2025.
Builds on
9 of 22 references.
Closest ancestors · 2
Same direction, newest first
- 2025Multi-Agent Penetration Testing AI for the Web28 Aug
- 2025Securing Agentic AI: A Comprehensive Threat Model and Mitigation Framework for Generative AI Agents28 Apr
Other references · 7
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 451
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
- 2025Open Challenges in Multi-Agent Security: Towards Secure Systems of Interacting AI Agentscited by 71
- 2024Refuse Whenever You Feel Unsafe: Improving Safety in LLMs via Decoupled Refusal Trainingcited by 69
- 2024MegaAgent: A Large-Scale Autonomous LLM-based Multi-Agent System Without Predefined SOPscited by 47
- 2025CyberSOCEval: Benchmarking LLMs Capabilities for Malware Analysis and Threat Intelligence Reasoningcited by 12
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward
- 2026Self-Reflection Fine-Tuning: Enhancing Agent Security against Prompt Injection Attacks from Failure Experience
- 2026SpecGuardBench: Can Coding Agents Construct Reliable Validation Harnesses from Natural Language Specifications?
- 2023A Zero-Shot Language Agent for Computer Control with Structured Reflection
- 2025Architecting Resilient LLM Agents: A Guide to Secure Plan-then-Execute Implementations
- 2026REFLECTOR: Internalizing Step-wise Reflection against Indirect Jailbreak
- 2026Autoformalization of Agent Instructions into Policy-as-Code
- 2026Skills as Verifiable Artifacts: A Trust Schema and a Biconditional Correctness Criterion for Human-in-the-Loop Agent Runtimes