HGM-Dual: Lineage-Aware Guided Agent Harness Optimization for Long-Horizon Planning
Organizations: Samsung Research America
Abstract
Harness optimization, which improves an agent's prompts, tools, and workflows, is an increasingly effective way to enhance agents built on frozen or closed-source LLMs. Leading approaches such as the Darwin--Godel Machine and the Huxley--Godel Machine (HGM) rely on recursive self-improvement and were developed mainly for coding, where the competence needed to improve the agent coincides with the competence being improved. Planning tasks, in which an agent must produce a sequence of tool calls that jointly satisfies interacting constraints, break this alignment. There, open-ended self-modification repeatedly explores ineffective changes and consumes substantial evaluation budgets. We introduce HGM-Dual, a diagnostic-guided framework for budget-efficient harness evolution for planning agents. First, HGM-Dual represents agent evolution as lineage-aware context. This context records what each ancestor changed, which behaviors improved or regressed, and which modifications were ineffective, giving the editor explicit edit-outcome attribution instead of an unstructured archive of past agents. Second, HGM-Dual introduces error-conditioned dual-path child generation. For each selected parent, it generates a general child that preserves open-ended exploration and specialized children that target the harness components most likely responsible for the parent's highest-ranked constraint violations. HGM-Dual outperforms the strongest baseline by up to 14.45% relative improvement in case accuracy while matching HGM variants' final performance with 2x-4x fewer evaluation budget.
Figures & tables
| Travel | Shopping | ||||
|---|---|---|---|---|---|
| Method | Evaluation Budget | Composite Score | Case Acc. (%) | Composite Score | Case Acc. (%) |
| Seed Agent | 0 | 76.46 0.22 | 25.00 | 81.91 1.17 | 50.83 |
| HGM | 4000 | 77.06 0.53 | 30.42 | 83.12 0.27 | 50.83 |
| HGM-CA | 4000 | 83.23 2.65 | 54.17 | 85.32 0.90 | 58.33 |
| HGM-CF | 4000 | 84.11 0.07 | 56.25 | 86.67 1.99 | 60.83 |
| HGM-Dual | 4000 | 87.77 1.31 | 64.38 | 89.23 1.33 | 66.67 |
| Travel | Shopping | ||||
|---|---|---|---|---|---|
| Method | Evaluation Budget | Composite Score | Case Acc. | Composite Score | Case Acc. |
| Seed Agent | 0 | 76.46 0.22 | 25.00 | 81.91 1.17 | 50.83 |
| ADAS | 1000 | 80.83 2.80 | 35.00 | 81.98 2.15 | 51.25 |
| GEPA | 1000 | 81.67 0.66 | 39.58 | 81.18 0.96 | 42.92 |
| HGM | 1000 | 77.06 0.53 | 30.42 | 83.12 0.27 | 50.83 |
| HGM-CA | 1000 | 80.65 0.26 | 41.67 | 84.46 0.38 | 53.75 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Unoptimized | Optimized | |
|---|---|---|
| Travel | $400–800 | $520–1,010 |
| Shopping | $140–360 | $300–910 |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 185 papers