TraceCoder: Explainable and Auditable Code Generation with Position-Key Snippet Versioning
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Contemporary LLM-based coding agents produce code as black-box outputs: the rationale behind each line is hidden, the evolution of the code through benchmark-driven repair is ephemeral, and post-hoc auditing is impossible. We present a code generation concept that addresses these shortcomings through three complementary mechanisms: (i) a relational snippet-history schema that records, per repair event, the benchmark reference, round number, failure text, and LLM explanation, enabling full provenance queries; (ii) a browser-based visualisation tool that renders this history as heat-mapped, hover-annotated source code; and (iii) a competitive fractional position-key indexing scheme with tree-node delimiters that assigns stable, lexicographically-ordered identifiers to each code snippet, enabling fine-grained tracking without disrupting surrounding lines. We evaluate TraceCoder on 30 algorithmic programming tasks spanning string processing, mathematical computation, and data-structure manipulation, across two provider configurations. Of these, 10 exhaust the 6-iteration budget on tasks with subtle edge-case behaviour. Mean Chg% reaches 30%, three in ten code snippets carry a traceable repair-event row, compared to 21% when using Gemini 2.0 Flash as sole provider on a 20-task subset. Three detailed case studies demonstrate how the system explains which specific benchmark failures shaped each line of the final program. The proposed mechanism makes the internal "narrative" of automated code generation auditable and replayable, a property essential for trust and accountability in production deployments.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 12 of its 25 references that are in the map. First posted on arXiv 28 Jul 2026.
Builds on
12 of 25 references.
Closest ancestors · 2
Same direction, newest first
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
Other references · 10
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2019Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AIcited by 1,552
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code
- 2025InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration
- 2026Improving LLM-Assisted Secure Code Generation through Retrieval-Augmented-Generation and Multi-Tool Feedback
- 2023SelfEvolve: A Code Evolution Framework via Large Language Models
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMs
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing
- 2026Tool-Guided Retrieval-Augmented Repair for Securing LLM-Generated C Code