Mitigating the Mirror Effect in Agentic Bug Detection: A Context-Grounded Human-in-the-Loop Architecture

Agentic code-reviewing and bug-finding tools can scale the software quality process, but source code often lacks the business rules needed to determine the correct solution. The Mirror Effect is defined as the retention and possible magnification of missing and/or ambiguous information in engineering artifacts created by AI. In bug finding, this effect manifests itself when an agent recognizes familiar code anti-patterns but considers locally plausible-looking code that does not conform to the external domain rules. In the exploratory pilot experiment, we examined 20 Python functions, including 8 pattern-evident defects, 8 context-dependent defects, and 4 clean controls. Without any context, one configuration of the detector found 6 out of 8 pattern-evident defects but 1 out of 8 context-dependent defects. Adding one sentence about the governing rule made the detector recognize all 8 context-dependent defects without any false positives for the controls. Wilson intervals and exact tests are provided, along with a discussion of the design limitations that render these counts exploratory. A four-layer human-in-the-loop system design is presented that consists of versioned context injection, confidence-based escalation, mirror-risk routing, and calibration feedback, using READY, REVIEW, and BLOCK release criteria, along with a replication procedure for testing. The goal is to focus human attention where the agent does not provide justification for its decision.

Authors

Publication Details

Journal
Preprints.org
Published
2026-11-13
DOI
https://doi.org/10.20944/preprints202611.1428.v1
Primary Topic
Software Testing and Debugging Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Mitigating the Mirror Effect in Agentic Bug Detection: A Context-Grounded Human-in-the-Loop Architecture

Kiran Paul Kanikaram
1 links
Preprints.org
Software Testing and Debugging Techniques
preprint

Mitigating the Mirror Effect in Agentic Bug Detection: A Context-Grounded Human-in-the-Loop Architecture

Kiran Paul Kanikaram
preprint en

Abstract

Agentic code-reviewing and bug-finding tools can scale the software quality process, but source code often lacks the business rules needed to determine the correct solution. The Mirror Effect is defined as the retention and possible magnification of missing and/or ambiguous information in engineering artifacts created by AI. In bug finding, this effect manifests itself when an agent recognizes familiar code anti-patterns but considers locally plausible-looking code that does not conform to the external domain rules. In the exploratory pilot experiment, we examined 20 Python functions, including 8 pattern-evident defects, 8 context-dependent defects, and 4 clean controls. Without any context, one configuration of the detector found 6 out of 8 pattern-evident defects but 1 out of 8 context-dependent defects. Adding one sentence about the governing rule made the detector recognize all 8 context-dependent defects without any false positives for the controls. Wilson intervals and exact tests are provided, along with a discussion of the design limitations that render these counts exploratory. A four-layer human-in-the-loop system design is presented that consists of versioned context injection, confidence-based escalation, mirror-risk routing, and calibration feedback, using READY, REVIEW, and BLOCK release criteria, along with a replication procedure for testing. The goal is to focus human attention where the agent does not provide justification for its decision.

Preprints.org
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon