ParetoSaddler: Pareto-Guided Optimization of Agent Harnesses for Quality and Cost
Organizations: University College London · Pohang University of Science and Technology · Southern University of Science and Technology · Southeast University ·
Abstract
Harness optimization can substantially improve LLM agents without modifying model weights, but existing methods primarily optimize response quality. Extending them to joint quality--cost optimization introduces a challenge: applying the deployment preference during intermediate updates can prematurely reject candidates that are valuable for later improvements. We introduce ParetoSaddler, which addresses this mismatch by separating intermediate candidate promotion from final deployment selection. At each iteration, an optimizer updates a parent harness to produce a candidate, and then compares the two over repeated executions and uses Bayesian bootstrap Pareto support to promote candidates showing credible progress in either quality or cost. Promoted candidates receive broader development evaluation and remain available as parents for later optimization steps. We evaluate ParetoSaddler on ClawMark and GAIA2 using domain-disjoint splits. On ClawMark, ParetoSaddler improves quality from 70.86% to 81.35% while reducing cost from $1.17 to $1.01 per task; on GAIA2, it improves quality from 56.22% to 62.89% while reducing cost from $0.78 to $0.45 per task. The Pareto-selected harnesses also achieve higher quality at lower cost than quality-only harness optimization. Analysis shows that Pareto-aware optimization retains intermediate candidates that would be discarded by deployment preference but can support later improvements, while Bayesian bootstrap screening filters out candidates whose gains are weakly supported across runs.
Figures & tables
| Setting | Metric | Overall | GAIA2 by Universe | |||
|---|---|---|---|---|---|---|
| ClawMark | GAIA2 | U21 (107) | U22 (112) | U27 (81) | ||
| Default Agent | Qual. | 70.86 2.29 | 56.22 1.07 | 58.26 1.08 | 53.57 1.55 | 57.20 2.57 |
| Cost | 1.17 0.17 | 0.78 0.08 | 0.82 0.18 | 0.71 0.03 | 0.82 0.04 | |
| AS-Quality | Qual. | 73.86 3.54 | 57.33 0.67 | 55.76 4.70 | 53.87 5.67 | 64.20 1.23 |
| Cost | 1.24 0.04 | 0.61 0.03 | 0.55 0.02 | 0.62 0.04 | 0.67 0.05 | |
| MH-MinCost | Qual. | 70.02 2.35 | 39.78 0.96 | 41.12 2.80 | 38.69 2.58 | 39.51 2.47 |
| Setting | Qual. | Cost |
|---|---|---|
| Single-run C | 76.95 5.50 | 0.95 0.06 |
| Single-run Q | 75.71 2.10 | 0.97 0.05 |
| Three-run C | 79.60 2.43 | 0.92 0.08 |
| Three-run Q | 81.35 3.11 | 1.01 0.02 |
| Setting | Metric | Mean | Bayesian |
|---|---|---|---|
| PS-Pareto C | Qual. | 76.86 5.41 | 79.60 2.43 |
| Cost | 1.09 0.09 | 0.92 0.08 | |
| PS-Pareto Q | Qual. | 76.53 2.12 | 81.35 3.11 |
| Cost | 1.15 0.04 | 1.01 0.02 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Train | Dev | Test |
|---|---|---|---|
| ClawMark | Clinical Assistant, Content Operation, EDA, Executive Assistant, HR, Research Assistant (50) | Investment Analyst, Project Management, Real Estate (20) | E-commerce, Journalist, Legal Assistant (22) |
| GAIA2 | Universe 29 (75) | Universe 30 (65) | Universes 21, 22, 27 (300) |
| Benchmark | Model | Reasoning | Fresh input | Cached input | Output |
|---|---|---|---|---|---|
| ClawMark | GPT-5.4 | High | $2.50 | $0.25 | $15.00 |
| GAIA2 | GPT-5.5 | Medium | $5.00 | $0.50 | $30.00 |
| Benchmark | Method | Proposals | Search tasks / proposal | Repeats | Task-execution budget |
|---|---|---|---|---|---|
| ClawMark | PS / AS | 17 | 3 + promoted dev. eval. | 3 | 1380 |
| MH | 8 | 70 | 3 | 1890 | |
| GAIA2 | PS / AS | 25 | 3 + promoted dev. eval. | 3 | 5520 |
| MH | 15 | 140 | 3 | 6720 |
| Repeated evidence | Diagnostic insight | Patch and repeated verification |
|---|---|---|
| Costly successful path. A research audit scores 1.0 in all three runs, but costs 1.58 / $0.69. The expensive run makes three subagent-spawn calls; the others make none. | Passing scores conceal different execution strategies. The cheaper local runs provide concrete alternatives to the delegated path; a single passing run would not reveal this contrast. | Prefer local execution for bounded reviews, narrow tool discovery, and disable unavailable web tools. After the patch, all three runs still score 1.0, at 0.63 / $0.81. This is consistent with reduced overhead, not an isolated causal estimate of delegation cost. |
| Medication omission. The medication-discrepancy check yields P/F/F: the first execution passes, but the next two omit the required finding. | One successful trajectory would hide inconsistent preservation of medication-timeline evidence as a distinct discrepancy. | Preserve one structured row per independent evidence issue. Post-patch failures fall from to . A different clinical check fails once after the patch, so targeted repair does not imply complete task correctness. |
| Customer-risk omission. The customer-champion-loss check yields P/P/F: the missing finding becomes visible only in the third execution. | Combining findings into a generic risk note can lose an independent customer-champion issue, even when other executions retain it. | Keep independent findings as separate evidence rows rather than merging them into one summary. Post-patch failures fall from to . |
| Persistent claim-handling failure. The taxi-claim amount check yields F/F/F, revealing a recurring problem across all observed executions. | The diagnosis identifies eligible missing-receipt claims being omitted or rejected instead of retained for policy-permitted approval. | Add a policy-conditional path that retains eligible pending claims with supporting evidence and requests approval. Post-patch failures fall from to . |
| Setting | E-commerce (8) | Journalist (8) | Legal Assistant (6) | Overall (22) | ||||
|---|---|---|---|---|---|---|---|---|
| Qual. | Cost | Qual. | Cost | Qual. | Cost | Qual. | Cost | |
| Single-run C | 72.46 9.90 | 0.89 0.02 | 82.34 3.13 | 1.05 0.09 | 75.74 5.15 | 0.88 0.09 | 76.95 5.50 | 0.95 0.06 |
| Single-run Q | 65.87 4.11 | 0.83 0.06 | 85.70 1.57 | 1.19 0.10 | 75.51 7.50 | 0.87 0.09 | 75.71 2.10 | 0.97 0.05 |
| Three-run C | 72.99 4.29 | 0.81 0.01 | 89.88 3.18 | 1.12 0.16 | 74.72 2.95 | 0.83 0.09 | 79.60 2.43 | 0.92 0.08 |
| Three-run Q | 77.77 7.51 | 0.87 0.07 | 87.81 3.55 | 1.28 0.03 | 77.51 5.88 | 0.83 0.08 | 81.35 3.11 | 1.01 0.02 |
| Task | Parent | Candidate | Difference | |||
|---|---|---|---|---|---|---|
| Quality (%) | Cost ($) | Quality (%) | Cost ($) | (pp) | ($) | |
| Content operation | ||||||
| Research assistant 4 | ||||||
| Research assistant 9 | ||||||
| Overall mean | 90.74 | 1.230 | 85.19 | 1.142 | ||
| Run | Setting | Metric | Overall | GAIA2 by Universe | ||
|---|---|---|---|---|---|---|
| GAIA2 (300) | U21 (107) | U22 (112) | U27 (81) | |||
| – | Default Agent | Qual. | 56.22 1.07 | 58.26 1.08 | 53.57 1.55 | 57.20 2.57 |
| Cost | 0.78 0.08 | 0.82 0.18 | 0.71 0.03 | 0.82 0.04 | ||
| Run 1 | PS-Pareto C | Qual. | 62.11 2.46 | 63.24 4.80 | 59.23 1.03 | 64.61 3.77 |
| Cost | 0.47 0.00 | 0.44 0.01 | 0.49 0.02 | 0.47 0.00 | ||
| PS-Pareto Q | Qual. | 62.89 2.14 | 61.99 2.35 | 60.71 2.36 | 67.08 1.89 | |
| Method | Generated | Time (s) | Est. cost ($) | LLM calls | Output tokens | Fresh-input tokens | Cache-read tokens |
|---|---|---|---|---|---|---|---|
| patches | /patch | /patch | /patch | /patch | /patch | /patch | |
| AS-Quality | 25 | 604 | 6.01 | 63.4 | 47,331 | 391,870 | 5,260,513 |
| MH-MinCost | 15 | 610 | 3.58 | 67.6 | 36,055 | 225,106 | 2,749,406 |
| MH-Pareto | 15 | 619 | 5.42 | 103.3 | 50,100 | 328,311 | 4,544,512 |
| PS-MinCost | 25 | 967 | 8.02 | 87.4 | 63,577 | 489,543 | 7,339,602 |
| PS-Pareto | 25 | 982 | 9.62 | 86.6 | 68,526 | 616,012 | 8,968,786 |
| Iter | Diagnosed issue | Implemented change | Final status |
|---|---|---|---|
| 1 | Private allergy notes and same-name ambiguity were overlooked; schema probing, unavailable Python commands, and large image batches consumed budget. | Added internal-evidence and Python compatibility guidance, Notion raw-API fallback steps, and smaller-batch advice in the image-tool description. | Dominated |
| 2 | Live trackers were not updated; budgets omitted actual spending; release conclusions omitted observed log gaps; schema and package probing continued after sufficient evidence. | Added guidance for live updates, complete budget arithmetic, release-evidence preservation, and fallbacks without extra dependencies. | Rejected |
| 3 | Required mentor contact was omitted; repeated Notion schema probes continued despite known identifiers and usable raw APIs. | Added responsible-party contact guidance and instructions to use known identifiers or raw APIs after one schema probe. | Dominated |
| 4 | Optional presentation and media exploration delayed required artifacts; a higher compensation tier was conflated with a compliance hold. | Added artifact-first guidance and instructions to report provisional tier eligibility separately while preserving compliance holds. | Dominated |
| 5 | Missing memory tools and helpers were repeatedly probed; a disputed appeal was prematurely marked resolved. | Added bounded-fallback and unresolved-appeal guidance. | Rejected |
| 6 | Contradictions and independent expense flags were omitted; requested financial messages were only drafted; missing helpers triggered retries. | Added row-level discrepancy and communication guidance, and bounded helper retries. | Dominated |
| File | Summary of changes |
|---|---|
| Tool-use skills skills/ | |
| gog/SKILL.md | Adds direct Google Sheets REST API fallback when helper tools or packages are unavailable; requires reading back updated ranges to verify live writes. |
| mcporter/SKILL.md | Discourages full schema dumps; recommends compact tool listings or inspection of one specific function. |
| notion/SKILL.md | Adds known mcporter calls and raw-API fallback for task-provided database IDs; requires querying records before concluding and retaining relevant private evidence in internal outputs without unauthorized external disclosure. |
| openai-whisper/SKILL.md | Recommends a small model for short English audio, targeted audio windows for long recordings, one active transcription strategy, and bounded polling before abandoning stalled jobs. |
| Agent and tool prompts src/agents/ | |
| File | Summary of changes |
|---|---|
| Tool-use skills skills/ | |
| mcporter/SKILL.md | Discourages repeated full-schema inspection; recommends focused calls and alternative Notion endpoints or raw REST after invalid-URL failures. |
| notion/SKILL.md | Adds sandbox-specific REST fallback guidance and directs batched operations toward supplied resource IDs rather than repeated searches or ID-format retries. |
| openai-whisper/SKILL.md | Prioritizes existing transcripts and small transcription models; limits transcription to decision-critical audio and recommends one long wait instead of repeated polling or duplicate jobs. |
| video-frames/SKILL.md | Recommends an initial contact sheet of four to six frames per video, followed by targeted inspection when needed; preserves visual risks, blockers, ownerless tasks, and delays as structured findings. |
| Agent tools and execution src/agents/ | |
| Iter | Diagnosed issue | Implemented change | Final status |
|---|---|---|---|
| 1 | Blocked rescheduling delayed safe deletions; announcements omitted details; contact lookup required paging. | Added partial-completion and message guidance, pagination reminders, and city/country contact search. | Dominated |
| 2 | Cancellation messages were vague; punctuation-sensitive product search caused retries. | Added self-contained message guidance and normalized fallback search after empty product results. | Dominated |
| 3 | Email replies omitted detail and signatures; bare final text caused invalid-answer retries. | Added reply-completeness guidance and a final-answer tool-use guard. | Rejected |
| 4 | Relative dates were misinterpreted; contact IDs were used as phone recipients; separate emails were batched. | Added temporal guidance, Calendar/Email contracts, and phone-recipient validation. | Dominated |
| 5 | Literal prefix matching missed required files; missing role search prompted broad contact scans. | Added role-aware contact search and multi-file cleanup guidance. | Rejected |
| 6 | Name ambiguity failed to block dependent writes; final answers incurred retries. | Added ambiguity-aware write guards, focused blocker messages, and tool-based final delivery. | Rejected |
| Source file | Summary of changes |
|---|---|
| Agent control and prompts agents/default_agent/ | |
| base_agent.py | Adds pre-tool-use guards for contact and destination ambiguity, calendar updates and invitations, email arguments, batched queries, product descriptors, conditional cab booking, and notification ordering. |
| prompts/system_prompt.py | Directs final and clarification messages through the user-interface tool; requires completing clear earlier subtasks before blocked later actions; anchors relative dates to the task or environment time. |
| termination_methods/are_simulation.py | Continues execution after cab-booking acknowledgements when delay or cancellation handling remains pending; adds termination handling for completed shopping workflows requesting no further notifications. |
| Application tools apps/ | |
| email_client.py | Adds date filters, header-only results, oldest-first listing, scoped whole-word search, and batched contact email activity and recency summaries; refines email-sending instructions. |
| File | Summary of changes |
|---|---|
| Agent execution and prompts | |
| are/simulation/agents/default_agent/ | |
| base_agent.py | Adds heuristic conversion of terminal plain-text responses into user-interface tool calls after prior tool activity; checks intended to exclude refusals and progress messages limit when conversion applies. |
| prompts/additional_prompts.py | Prioritizes compact search, filtering, and counting over broad listing and repeated lookups; requires tool-based final responses and clarifications; clarifies authorization for simulated app actions. |
| Application tools are/simulation/apps/ | |
| apartment_listing.py | Adds multi-zip-code search, unsaved-property filtering, and sorting by square footage; refines listing and saving guidance. |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 197 papers