mlsanityData to 24 Nov 2026

PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles

arXiv 2611.33519 ↗Submitted 24 Nov 2026Announced 26 Nov 2026cs.CR cs.AIcited by 0

On the map: LLM agents and tool use → Software engineering coding agents also fits: Agent threats, guardrails and governance

Abstract (arXiv)

AI coding agents increasingly write and submit code with limited human review, and much of it passes functional tests while remaining insecure. We show that these failures persist. Across 14 task sequences, Codex, Claude Code, and Qwen Code fixed a vulnerability 85.7% of the time when shown the failing security test, then reintroduced the same vulnerability class in a new session 26.7% of the time, about as often as agents that had never seen it (27.5%). The capability is present; the retention is not. Neither recording the repair in the agent's persistent context nor supplying published secure coding principles closed the gap: the recorded fix stayed tied to the family of the task it came from, and the principles, written for human developers, remained too general to apply to the code at hand. The knowledge exists; it is not activated. We call the missing ability security self-improvement: an agent learns from its own security failures so that each lesson persists across sessions, applies to new code, and does not break what works. We present PRECEPT, which equips coding agents with this ability through an evolving library that starts from authoritative secure coding principles and revises them against the agent's own failures, so that each principle comes to fire on the code where that agent actually goes wrong. A revision is kept only if fresh executions show it makes code more secure while keeping functional success within a small tolerance of the agent without the library. Improvement continues across evolution steps rather than saturating after the first. On task families never seen during evolution, PRECEPT's weakest agent reaches 97.1% secure working code, above the strongest unaided agent at 81.9% and the strongest baseline at 87.7%.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 61 of its 86 references that are in the map. Submitted 24 Nov 2026, announced 26 Nov 2026.

Builds on

61 of 86 references.

Closest ancestors · 4

Same direction, newest first

  1. 2026SpecForge: Recursive Self-Improvement for Coding Agents via Behavioral Specifications11 Oct
  2. 2026Self-Evolving Coding Rules for AI Coding Agents30 Sep
  3. 2025A Self-Improving Coding Agent21 Apr
  4. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 57

  1. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,789
  2. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,799
  3. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,483
  4. 2023ExpeL: LLM Agents Are Experiential Learnerscited by 1,067
  5. 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 699
  6. 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 530
  7. 2024Agent Workflow Memorycited by 482
  8. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 446
  9. 2025Defeating Prompt Injections by Designcited by 384
  10. 2023Language Models can Solve Computer Taskscited by 376
  11. 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agentscited by 276
  12. 2023Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generationcited by 213
38 more
  1. 2024Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluationscited by 203
  2. 2026SkillOpt: Executive Strategy for Self-Evolving Agent Skillscited by 196
  3. 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoningcited by 171
  4. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 165
  5. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 156
  6. 2024GuardAgent: Safeguard LLM Agents by a Guard Agent via Knowledge-Enabled Reasoningcited by 152
  7. 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agentscited by 128
  8. 2025AGrail: A Lifelong Agent Guardrail with Effective and Adaptive Safety Detectioncited by 101
  9. 2024Instruction Tuning for Secure Code Generationcited by 75
  10. 2025Contextual Agent Security: A Policy for Every Purposecited by 72
  11. 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 71
  12. 2023LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluationscited by 67
  13. 2025BaxBench: Can LLMs Generate Correct and Secure Backends?cited by 48
  14. 2024Constrained Decoding for Secure Code Generationcited by 42
  15. 2024AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testingcited by 39
  16. 2026Formal Policy Enforcement for Real-World Agentic Systemscited by 39
  17. 2025Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Taskscited by 30
  18. 2024ProSec: Fortifying Code LLMs with Proactive Security Alignmentcited by 29
  19. 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 22
  20. 2025PurpCode: Reasoning for Safer Code Generationcited by 20
  21. 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Datacited by 19
  22. 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injectioncited by 19
  23. 2025SecRepoBench: Benchmarking Code Agents for Secure Code Completion in Real-World Repositoriescited by 19
  24. 2024SecCoder: Towards Generalizable and Robust Secure Code Generationcited by 18
  25. 2025"Your AI, My Shell": Demystifying Prompt Injection Attacks on Agentic AI Coding Editorscited by 18
  26. 2025SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarioscited by 18
  27. 2026RealSec-bench: A Benchmark for Evaluating Secure Code Generation in Real-World Repositoriescited by 16
  28. 2026SafeEvolve: Harness-Policy Co-Evolution from Agent Experience for Safety Alignmentcited by 14
  29. 2025Rethinking the Evaluation of Secure Code Generationcited by 13
  30. 2026SHE: Trajectory-driven Safety Harness Evolution for LLM Agentscited by 12
  31. 2025Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferencescited by 11
  32. 2025A Mixture of Linear Corrections Generates Secure Codecited by 10
  33. 2026Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Modelcited by 9
  34. 2025SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflowscited by 7
  35. 2026When Experience Becomes Instruction: Trajectory Poisoning in Self-Evolving Agent Skill Systemscited by 7
  36. 2025When "Correct" Is Not Safe: Can We Trust Functionally Correct Patches Generated by Code Agents?cited by 6
  37. 2026EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agentscited by 4
  38. 2026Reflections on Trusting Trust, Revisited: Contaminating Self-Modifying AI Coding Agents with Poisoned Benchmarkscited by 4

50 most cited of 57 All 57 (JSON)

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward
  2. 2026Security in the Age of AI Teammates: An Empirical Study of Agentic Pull Requests on GitHub
  3. 2026Towards a Risk Assessment of Malicious Skill Files in Coding Agents
  4. 2026Coding with "Enemy": Can Human Developers Detect AI Agent Sabotage?
  5. 2026Guardrails Beat Guidance: A Large-Scale Study of Rules, Skills, and Persistent Configuration for Coding Agents
  6. 2026Teaching Agents to Code Reliably
  7. 2025Takedown: How It's Done in Modern Coding Agent Exploits
  8. 2026Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study