Counterglass

Testing stateful tool agents

Can a successful agent response conceal an incorrect database or file state?

Paper PDF ↓Sources & citation

Method

Checkpoint real SQLite and file state together with a resumable policy state. Change one declared environmental condition, continue execution, and check the resulting state independently.

The selector study compares ten policies over thirty-two seeds and three authored workflow structures. Separate ToolSandbox and local-model cases exercise the testing mechanism beyond the scripted selector evaluation.

Results

EvidenceResult
Locked selector study1,280 episodes and 54,619 paired trial occurrences
Primary pooled vs independent index4.031 vs 3.812 signatures; frozen composite target missed
Stronger simple comparatorSchema heuristic finds 4.719 signatures at the primary budget
Fresh independent replayAll 7,177 unique pairs checked with zero mismatches
Original cost-quality comparison across testing policies in the locked counterglass study.
Cost and failure-signature comparisons for the locked selection policies. Signature counts are not automatically distinct root causes.

Interpretation

The stateful failure-evidence mechanism is useful within its supported workflows. The added pooled selector does not earn a general discovery claim and loses to the simpler schema heuristic.

Limitations

  • The study holds out parameters within three authored structures, not entire unseen applications.
  • Evidence records are unsigned. Consistency checking and fresh replay do not authenticate arbitrary executions or prove every internal policy transition.

Paper & sources

Counterglass: Stateful Counterfactual Failure Evidence and a Budgeted Search Study

Cite this study
@misc{abdulhadi2026counterglass,
  author = {Nazeeh Abdul-Hadi},
  title = {Counterglass: Stateful Counterfactual Failure Evidence and a Budgeted Search Study},
  year = {2026},
  url = {https://nazeeh111.github.io/research/counterglass/}
}