Jiayuan Zhou
ISSTA 2026 · Distinguished Paper

Lingxi灵犀

Repository-Level Issue Resolution Framework Enhanced by Procedural Knowledge Guided Scaling

Experienced developers know something before they explore: how a kind of problem is diagnosed and fixed, and why. Lingxi recovers this procedural knowledge from a repository's own history and puts it in front of the coding agent, so that analysis, planning and fixing follow the procedure that fits the issue at hand.

Xu Yang1, Jiayuan Zhou2, Michael Pacheco2, Wenhan Zhu2, Pengfei He1, Shaowei Wang1,∗, Kui Liu3, Ruiqi Pan3

1University of Manitoba, Canada · 2Huawei, Canada · 3Huawei Software Engineering Application Technology Lab, China · ∗Corresponding author

Related plugin: Lingxi Advisor ↗Built on the same idea, not a reproduction.

Take-homeKnowledge comes first; exploration follows. Give the agent the procedural knowledge behind issues of the same kind, how they are understood, analyzed and fixed, and why, and its exploration gains a direction for the issue at hand.
01 · Motivation

Implicit knowledge tells developers where to look.

How does an experienced developer approach an issue? Before they explore, they already know something.

While learning and working, developers build up implicit knowledge: how a kind of problem is understood, analyzed and solved. A new problem rarely matches an old one exactly, so they draw a few shared patterns from many past cases, and together these patterns guide where they look first. Knowledge comes first; exploration follows.

An experienced developer

Draws on what past cases share

123ruled outslow pageviewORMN+1 queries

Many paths lead away from a slow page. The developer follows one, through the view and the ORM to the per-item queries, and rules out a side branch early. The numbered steps are the procedure; the why is what makes it reusable on the next slow page, even in a different codebase. That is procedural knowledge: how a kind of problem is diagnosed and fixed, and why. It is implicit: it lives in experience, not in the code.

Procedural knowledge

When a page loads slowly:

  1. 1Count the database queries
  2. 2Find the loop that issues them
  3. 3Confirm it in the query log

WHYper-item queries, the N+1 problem, are a common cause.

How coding agents explore today

What a coding agent brings to the same situation: three ingredients

1
The model's own knowledge

General programming know-how in its weights: strong, and growing with every model.

2
The current repository

Its code and documents, as they are now.

Codebase & documents
3
Explore and traverse

Sample, branch, retry: many trajectories.

③ explores ② with ①. So, for this issue, will the right experience come to mind?

What today's agents miss

Not reliably, for two reasons.

Current agents are good at exploring in general. Two things keep that exploration from being guided by the procedure that fits the issue at hand.

Without task-specific direction ③ exploration

Knowing how to explore, but not how this issue is best explored

Models are trained on large amounts of code and already know, in general, how to explore a repository: search, read, reproduce, test. What they cannot know in advance is how this task is best approached in this repository: which practice applies, what to check first, and how the fix must fit the existing code.

Nothing ensures the right practice is recalled at the right moment, and private codebases were never in the training data. So gains come from more attempts: more samples, more retries. Coverage grows; direction for this issue does not.

In prior work: test-time scaling that samples many candidates and selects one, e.g. Trae, DARS, DEI.

At the surface procedural knowledge

Procedural knowledge missing, or history reused as raw data

Many agents use none: they work from the code and documents as they are now, which record the current state but not how similar issues were handled. Those that do draw on history reuse it as raw data: past issue reports and patches, retrieved as text. What was changed survives; the procedure behind it is lost: how the issue was diagnosed, and why this fix.

A copied change helps only when the new issue looks almost the same. The procedure behind it is what carries over.

In prior work: code graphs and ASTs of the current repository, e.g. Agentless, AutoCodeRover, CGM; similar past issues as text, e.g. SemAgent.

What Lingxi doesLingxi recovers the procedure from the repository's own past issues and their patches, abstracts it so it transfers to similar issues, and, when a new issue arrives, puts the relevant pieces in front of the agent. The past fix is where the knowledge comes from; what the agent receives is the procedure.
02 · Method

Recover the procedure offline; guide every new issue.

Lingxi works in three phases. Phase 1 runs once per repository, over its history. Phases 2 and 3 run for each new issue: the retrieved knowledge first steers the analysis, then the planning and the fix.

Overview of Lingxi, simplified from Figure 3 of the paper. The numbered labels match the three phases described below: 1 knowledge construction, 2 knowledge-guided analysis scaling, 3 issue resolution.
1Phase 1 · offline knowledge construction

From issue-specific to transferable knowledge.

A past fix leaves only two things: the issue report and the final patch. The procedure in between is missing, so a knowledge agent recovers it in two steps. In Step 1 it reasons in reverse: it starts from the patch, navigates the repository snapshot where the issue occurred, and explains why each edit fixes the issue. In Step 2 it abstracts the result so that it transfers to issues that are similar but not identical.

Knowledge is built per repository from its own history; for each target issue, only issues created before it are used.

Step 1 · reverse reasoning

Issue-specific knowledge

Starting from the patch, the knowledge agent explains why each edit fixes the issue, along 14 aspects.

Understanding 8 aspects
What it takes to locate and comprehend the issue
Code
relevant architecturedependency analysiscall trace
Problem
bug categorizationroot-cause analysiscurrent vs. expected behavior
Usage
example usage contextfeature / functionality
Fixing 6 aspects
What it takes to fix it and verify the fix
Change
fix patternconcrete fix steps
Verify
fix checklisttest case
Fit
design patterns & code practicesresolution conclusion
Root-cause analysis · django #14200 · step 1

"The bug was caused by:

  1. Direct instantiation of RegexURLResolver instead of using the memoized get_resolver()
  2. Each request created a new RegexURLResolver instance, even when processing the same URLconf
  3. The memoization optimization in urlresolvers.get_resolver() was bypassed
  4. No consideration for memory/performance impact of creating new resolver instances"
Step 2 · abstraction

Transferable knowledge

The same knowledge, rewritten for a newcomer to the repository: general, actionable, and structured so later phases can use it.

Understanding
General and actionable
Code
relevant architecturedependency analysisspecific classes / methods
Problem
general root-cause analysis stepsbug categorizationfeature
Fixing
Ready for planning and fixing
Change
general fix pattern
Verify
general fix checklist
Fit
design patterns & code practices
General root-cause analysis steps · same issue · step 2
  1. "Identify the request handling flow and URL resolution process
  2. Review how URL configuration is managed during request processing
  3. Analyze object creation patterns and resource usage
  1. Check for performance optimization opportunities like caching/memoization
  2. Verify thread-safety and resource cleanup mechanisms
  3. Test behavior with different URL configuration scenarios"

The issue: every request built a fresh URL resolver instead of reusing the cached one, wasting memory and time. Step 1 names the class and the memoized function that was bypassed. Step 2 turns this into a way to diagnose similar problems in any codebase: follow the request flow, look at which objects are created on every request, and check whether an existing cache is being bypassed.

2Phase 2 · knowledge-guided analysis scaling

One piece of knowledge per analysis agent.

A new issue arrives. Lingxi first summarizes it into four fields, then retrieves the knowledge of similar past issues: an embedding search keeps the top 20, a reranker orders them, and the three most relevant are kept.

Why one source per agent? Put all retrieved knowledge into one long prompt and the model tends to lose what is buried in the middle. Instead, each piece of knowledge guides its own analysis agent: three pieces, three agents, each following a different procedure and writing its own report. Analysis synthesis then keeps what is supportive, complementary, accurate and complete, and produces one consolidated analysis. The relevant knowledge is no longer left to recall; it is put in front of the agent.

Phase 2: knowledge-guided analysis scaling The new issue is summarized into core problem, technical details, expected versus actual behavior, and relevant code. Similar past issues are retrieved. Knowledge 1, 2 and 3, each from a different past issue, go to analysis agents 1, 2 and 3; each agent sees the issue plus one piece of knowledge and writes a report. Analysis synthesis keeps what is supportive, complementary, accurate and complete, and produces one consolidated analysis. NEW ISSUE Structured summary Core problem Technical details Expected vs. actual Relevant code RETRIEVE similar past issues KNOWLEDGE 1 from past issue 1 ANALYSIS AGENT 1 issue + knowledge 1 Report 1 KNOWLEDGE 2 from past issue 2 ANALYSIS AGENT 2 issue + knowledge 2 Report 2 KNOWLEDGE 3 from past issue 3 ANALYSIS AGENT 3 issue + knowledge 3 Report 3 ANALYSIS SYNTHESIS Supportive Complementary Accurate Complete → one consolidated analysis
3Phase 3 · issue resolution

Plan and fix with analysis and issue-fixing knowledge.

The analysis says what is wrong; Phase 3 turns it into a patch with two agents. The issue-fixing part of the retrieved knowledge guides both of them.

From phase 2

Consolidated analysis

Root cause · scope · constraints

What is wrong, where it sits in the code, and what the change must not break, merged from the parallel analyses.

From the knowledge base

Issue-fixing knowledge

  • General fix pattern
  • General fix checklist
  • Design patterns & code practices

→ shapes what the plan changes, and how the change fits the codebase

Planning agent

Explore → reproduce → plan

A root-cause assessment and a line-level change plan, informed by the analysis and the issue-fixing knowledge. The agent explores the code, reproduces the issue, and links each planned change to the problem it addresses.

Fixing agent

Implement → test → refine

Apply the change, run the reproduction test, and refine until it passes: the final patch. The checklist tells it what to verify. Both agents work with four tools: directory view, file view, keyword search and a string-replace editor.

03 · Evaluation

Does it pay off, and which knowledge helps?

All experiments use SWE-bench Verified: 500 real GitHub issues from 12 open-source Python projects, each checked by hidden tests. Pass@1 is the share of issues whose single generated patch passes. For each target issue, knowledge comes only from issues created before it.

Experiments with commercial models completed before Sept 2025
RQ1 · overall effectiveness

With the same base model, Lingxi resolves the most issues.

RQ1: Pass@1 on SWE-bench Verified, grouped by base model GPT-4.1 mini: mini-SWE-agent 23.94, Lingxi 45.20. Kimi-K2: mini-SWE-agent 43.80, OpenHands 65.40, Lingxi 70.33. Claude 4 Sonnet: mini-SWE-agent 64.93, SWE-agent 66.60, SWE-search 70.08, OpenHands 70.40, Augment v1 70.40, Lingxi 74.60. 20 40 60 80 23.94 mini-SWE-agent 45.20 Lingxi GPT-4.1 mini Lingxi +21.3 pp 43.80 mini-SWE-agent 65.40 OpenHands 70.33 Lingxi Kimi-K2 Lingxi +4.9 pp 64.93 mini-SWE-agent 66.60 SWE-agent 70.08 SWE-search 70.40 OpenHands 70.40 Augment v1 74.60 Lingxi Claude 4 Sonnet Lingxi +4.2 pp Same framework, stronger model → 45.2 · 70.3 · 74.6

How to readEach group uses one base model, so within a group only the framework differs. The baselines are the top leaderboard entries that use the same base model; multi-model ensembles are excluded.

What it showsWith Claude 4 Sonnet, Lingxi reaches 74.6%, 4.2 points above the strongest compared frameworks, OpenHands and Augment v1 (70.4%). With Kimi-K2, 70.3 versus 65.4. With GPT-4.1 mini, Lingxi nearly doubles mini-SWE-agent: 45.2 versus 23.9. Across groups, a stronger model lifts the same framework (the red line), and Lingxi is on top in every group. The knowledge adds to the model; it does not replace it.

RQ2 · ablation · 218 sampled issues · Claude 4 Sonnet

The gain comes from transferable knowledge; parallel analysis builds on it.

+6.5 ppRaw pairs → transferable knowledge68.30 → 74.80, both with parallel analysis
+2.3 ppParallel analysis, guided by knowledge72.48 → 74.80, both with transferable knowledge

How to readWhere does the gain come from: the knowledge, or the parallel agents? Each row removes or replaces one part of Lingxi. The 218 issues are a statistical sample (95% confidence, 5% margin of error).

What it showsWithout knowledge, Pass@1 is 67.4 to 67.7. Raw issue–patch pairs, the fix without the procedure, reach 68.3. Transferable procedural knowledge brings the largest step, to 74.8. Parallel analysis builds on that: with knowledge it adds 2.3 points, because each path follows its own piece of knowledge and the findings combine; without knowledge, parallel analyses of the same issue report land close to a single one. The two work together.

Differences are absolute percentage points; the paper's Table 3 reports the same results as relative Δ. The 218-issue subset is a different scope from the 500-issue results in RQ1.

RQ3 · which knowledge helps, and when

Design practices matter most, and roles shift by stage.

Number of the 20 issues in which each knowledge aspect was decisive, by stage
Knowledge aspectAnalysisstage 1Planningstage 2Fixingstage 3Totalall stages
Root-cause analysis steps7··7
Relevant architecture7··7
Bug categorization3··3
Feature / functionality3··3
Design patterns & coding practices·11415
General fix pattern·6814
Fix checklist·3811

How to readWe took 20 issues that Lingxi resolved and its knowledge-free variant did not. Two authors compared the two trajectories of each and marked which knowledge aspect was decisive at each stage (Cohen's κ = 0.66). A number counts the issues in which that aspect was decisive at that stage; each stage column sums to 20.

What it showsIn analysis, root-cause analysis steps and relevant architecture dominate. In planning, design patterns and coding practices take over. In fixing, fix patterns and checklists lead. Overall, design patterns and coding practices matter most.

What a design practice looks like · sympy-23413

The Hermite normal form is wrong for rectangular matrices.

Two practices in the retrieved knowledge, from earlier sympy issues, became concrete actions in this issue:

Process the full structure, not a shape heuristicfrom sympy #10785
process all rows, not min(m, n)
Add boundary guardsfrom sympy #17130
stop when the columns run out: if k < 0: k = 0; break
Same pipeline, without knowledge
blamed the return statement, patched only the surface, and failed

Models know these practices in general. Retrieved knowledge brings the right one to mind, for this issue.

04 · Limitations & outlook

Knowledge helps most when the agent follows it.

127 of the 500 issues remain unresolved. We sampled 20 of these failures and asked why. In 15, the relevant knowledge was available, and the agent set it aside and followed its own reasoning (the paper calls this uninformed autonomy); in 5, the retrieved knowledge was too sparse to steer the repair. How and when knowledge reaches the agent matters as much as recovering it.

Upper bound · oracle selector, not a system result
79.2%

If three patches were sampled after Lingxi's analysis and an oracle always picked a passing one when it exists, 396 of 500 would pass. Lingxi has no such selector; the number marks the headroom for better patch selection.

Next steps
  • Extend knowledge guidance from analysis into patch generation.
  • Balance agent autonomy with knowledge guidance.
  • Validate beyond Python: the knowledge is procedure rather than syntax, but SWE-bench Verified covers Python only.
05 · Discussion

From paper to practice: what code never records.

From the paperProcedural knowledge, how issues are diagnosed and fixed and why, adds what the current code cannot show.

It complements tools you may already use. Take one question, from astropy issue #14182: an RST table is written with a single header row, and the request is to let the writer add further header rows, such as units. On a time axis, three kinds of tool give three kinds of answer.

PAST
LingxiProcedures and rationales from historical fixes
From #386 · feature & functionality
  1. Supports reading/writing fixed-width formatted data
  2. Handles configurable header structures
  3. Supports various header configurations through header_rows
PRESENT
DeepWikiCode-grounded documentation, architecture and Q&A
io.ascii · RST page illustrative
  • RST format in io/ascii/rst.py
  • Built on the fixed-width classes
  • Header and data classes per format
INTENDED CHANGE
OpenSpecProposal, requirements, design and implementation tasks
Proposal · RST header rows illustrative
  • Why units in RST output
  • What accept header_rows
  • Tasks ☐ argument ☐ write rows ☐ test

Same astropy question, three kinds of answer: complementary perspectives, not exclusive capabilities. The DeepWiki and OpenSpec entries are illustrative; the Lingxi entry is quoted from the transferable knowledge of astropy #386.

Related plugin · Lingxi Advisor

Procedural knowledge for your coding agent

Lingxi builds its knowledge offline, which is not convenient day to day. Lingxi Advisor is a separate plugin built on the same idea: it brings procedural knowledge into everyday coding agents. Works with iCode and OpenCode.

Runtimeuse it

When the agent is unsure, it searches the procedural knowledge prepared for this repository and applies it, with sources.

Preparemine it

Derives procedural knowledge from a past issue and its patch, one at a time or in batches.

Disclaimer. Lingxi Advisor is a related plugin, not a reproduction of this paper: it shares the paper's core idea, procedural knowledge for coding agents, but its pipeline is its own and it is not the system evaluated in the paper. All numbers on this page come from the research implementation, and the Distinguished Paper recognition applies to the paper. Installation and supported platforms are in the plugin README.

06 · Cite

Cite this work.

Lingxi appears at ISSTA 2026 (Distinguished Paper). If you use it, please cite:

@inproceedings{yang2026lingxi,
  title     = {Lingxi: Repository-Level Issue Resolution Framework
               Enhanced by Procedural Knowledge Guided Scaling},
  author    = {Yang, Xu and Zhou, Jiayuan and Pacheco, Michael and
               Zhu, Wenhan and He, Pengfei and Wang, Shaowei and
               Liu, Kui and Pan, Ruiqi},
  booktitle = {Proceedings of the ACM SIGSOFT International Symposium
               on Software Testing and Analysis (ISSTA)},
  year      = {2026},
  note      = {Distinguished Paper Award. Preprint: arXiv:2510.11838}
}