CEGAR-Harness: Regression-Aware Context Compaction and Witness Replay for Long-Horizon Coding Agents

Long-horizon coding agents rely on context compaction to remain within token budgets and avoid quadratic attention degradation. However, lossy compaction discards historical test failure traces, inducing Post-Compaction Regression Loops where an agent re-introduces previously refuted bugs. We present CEGAR-Harness, a Counterexample-Guided Abstraction Refinement middleware that couples context compaction with a versioned SQLite Counterexample Ledger and a 3-state Regression Gate (PASS, REGRESSION_DETECTED, INCONCLUSIVE) combining canonical AST pre-filtering and isolated Witness Replay. Evaluated across a 30-task controlled multi-turn benchmark (4-way ablation), a live Llama-3-8B GPU repair loop (achieving a 4x resolution gain: 66.7% vs. 16.7% with 0% unblocked regressions), and 6 multi-file Git repositories (100% atomic rollback in 29.4 ms), CEGAR-Harness eliminates post-compaction regressions while preserving 48.3% token compression.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-28
DOI
https://doi.org/10.5281/zenodo.23731910
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CEGAR-Harness: Regression-Aware Context Compaction and Witness Replay for Long-Horizon Coding Agents

Iyed Mohamed
3 links
Zenodo (CERN European Organization for Nuclear Research)
Software Testing and Debugging Techniques
article

CEGAR-Harness: Regression-Aware Context Compaction and Witness Replay for Long-Horizon Coding Agents

Iyed Mohamed
article en

Abstract

Long-horizon coding agents rely on context compaction to remain within token budgets and avoid quadratic attention degradation. However, lossy compaction discards historical test failure traces, inducing Post-Compaction Regression Loops where an agent re-introduces previously refuted bugs. We present CEGAR-Harness, a Counterexample-Guided Abstraction Refinement middleware that couples context compaction with a versioned SQLite Counterexample Ledger and a 3-state Regression Gate (PASS, REGRESSION_DETECTED, INCONCLUSIVE) combining canonical AST pre-filtering and isolated Witness Replay. Evaluated across a 30-task controlled multi-turn benchmark (4-way ablation), a live Llama-3-8B GPU repair loop (achieving a 4x resolution gain: 66.7% vs. 16.7% with 0% unblocked regressions), and 6 multi-file Git repositories (100% atomic rollback in 29.4 ms), CEGAR-Harness eliminates post-compaction regressions while preserving 48.3% token compression.

Zenodo (CERN European Organization for Nuclear Research)
École Supérieure Privée d'Ingénierie et de Technologies (TN)
Openalex Percentile: Top 4%
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
CEGAR-Harness: Regression-Aware Context Compaction and Witness Replay for Long-Horizon Coding Agents — Iyed Mohamed · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS