Towards Exception Safety Code Generation with Intermediate Representation Agents Framework
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Large Language Models (LLMs) often struggle with robust exception handling in generated code, leading to fragile programs that are prone to runtime errors. We propose Seeker, a novel multi-agent framework that enforces exception safety in LLM generated code through an Intermediate Representation (IR) approach. Seeker decomposes exception handling into five specialized agents: Scanner, Detector, Predator, Ranker, and Handler that collaboratively analyze code, detect fragile segments, retrieve best practice exception strategies, and inject robust handling code. We also introduce Common Exception Enumeration (CEE), a comprehensive knowledge base derived from official documentation, technical practices, and real world code, to standardize exception handling strategies. Seeker also incorporates a Deep Retrieval-Augmented Generation (Deep RAG) algorithm to efficiently navigate the exception inheritance hierarchy, cutting down search overhead by 93% while improving accuracy in identifying relevant exceptions. We evaluate Seeker on 15 open source Java projects and multiple benchmarks. Seeker outperforms state of the art baselines, improving exception handling precision by up to 37% and overall code robustness by 38% as measured by expert code review. It significantly closes the gap between LLM and human developers in exception management, achieving a 28% success rate on real world issue fixes (SWE bench) versus 19% by prior methods. Our framework preserves functional correctness of code while proactively handling errors, demonstrating a practical, generalizable solution for safer code generation. In this paper, we discuss the novelty of using intermediate representation and multi-agent collaboration for exception handling, and outline how Seeker can be extended to other programming languages and complex software engineering tasks, aligning LLM-generated code with industrial standard.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 14 of its 35 references that are in the map. First posted on arXiv 9 Oct 2024.
Builds on
14 of 35 references.
Closest ancestors · 3
Same direction, newest first
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolution26 Mar
- 2023Self-collaboration Code Generation via ChatGPT15 Apr
Other references · 11
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023Visual ChatGPT: Talking, Drawing and Editing with Visual Foundation Modelscited by 659
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2023From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI Chainingcited by 15
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Seeker: Towards Exception Safety Code Generation with Intermediate Language Agents Framework
- 2025SHIELDA: Structured Handling of Exceptions in LLM-Driven Agentic Workflows
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safety
- 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistants
- 2026TDD-Agent: Test-Driven Reasoning for Code Generation
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- 2024AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testing
- 2026SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces