Cross-Interface Harness Adaptation via Abstract Contract Synthesis
A system that synthesizes abstract semantic interface adapters to transfer evolved harness middleware across environments with incompatible tool definitions and execution APIs.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
Section Limitations notes: 'We study settings with compatible harness interfaces and keep the optimizer’s planning and search procedures fixed. Our comparisons evaluate SIM as a complete procedure, combining inherited memory with updates during target optimization.'
“We study settings with compatible harness interfaces and keep the optimizer’s planning and search procedures fixed. Our comparisons evaluate SIM as a complete procedure, combining inherited memory with updates during target optimization.”
Limitation
CRSI relies strictly on identical or backward-compatible executable interfaces between source and target settings, making it inapplicable when transferring evolved harness logic across distinct runtime environments (e.g., shell CLI versus REST/MCP tool protocols).
Proposed Solution
Deconstruct harness modules into abstract control patterns (such as completion gates, output validators, and retry state machines) separated from concrete execution wrappers. Introduce an AST-level adapter synthesis stage at transition time that inspects target environment tool declarations and translates inherited harness interfaces into target-compatible bindings before running target RSI.
The paper’s authors list this direction as future work, so they may already be pursuing it.
Why This Matters
Allowing transfer across incompatible execution interfaces would enable agent developers to reuse months of harness optimization from sandboxed CLI benchmarks directly in production API environments.
How to Get Started
How to test it: Test transferring an evolved Terminal-Bench bash harness to an MCP-based agentic workspace benchmark (JobBench/APEX-Agents). Measure pass rate and syntax error rate against a cold-start baseline; stop if synthesized adapters cause greater than 20% runtime execution crashes.
- Extract the completion gating interlock from the evolved Terminus-2 harness as a standalone abstract state machine.
- Define an intermediate representation for tool-interception logic decoupled from bash command execution.
- Write an LLM prompt template that maps the abstract interlock specification onto MCP function calling wrappers.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like Code as Agent Harness and What makes a harness a harness analyze the structural definition and properties of agent harnesses. They do not, however, propose an AST-level adapter synthesis stage to dynamically translate inherited harness interfaces into target-compatible bindings via abstract control pattern deconstruction.
- Code as Agent Harness · 2026 · 107 citations
- What makes a harness a harness: necessary and sufficient conditions for an agent harness · 2026 · 10 citations
We searched OpenAlex and arXiv for “agent harness interface synthesis cross-environment transfer” and “Cross-Interface Harness Adaptation via Abstract Contract Synthesis” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Self-Improvement Memory Enables Continual Recursive Self-ImprovementXin Yu, Fei Xia, Jiaqi Pan +7 more · 2026
This paper introduces Continual Recursive Self-Improvement (CRSI), a framework for continuing LLM agent harness optimization across changes in task benchmarks or underlying policy models. To prevent loss of context and redundant edits across transitions, the authors propose Self-Improvement Memory (SIM), which records harness diagnoses, attempted code modifications, rationales, and verified outcomes. Across coding, text classification, agentic workspace, and engineering benchmarks, maintaining SIM enables higher downstream performance and more effective reuse and revision of inherited harness components compared to harness-only transfer.
Related Ideas
- Hierarchical Specification-to-Patch Synthesis for Large-Scale Repository ChangesSWE-CoWork: Benchmarking Coding Agents as Digital Employees in Organizations🟠Medium
- Retrieval-Augmented Feedback for Code GenerationGEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning🟠Medium
- Bidirectional Dynamic Planning for Evolving SpecificationsDeepCode: Open Agentic Coding🟠Medium
- Meta-Learning for Resilient Tool AdaptationStep-DeepResearch Technical Report🔴Hard
- Execution-Time and Hardware-Cost-Aware Scoring Beyond Token Budgets in Agentic Kernel OptimizationAscendGYM: A Cost-Aware Kernel Optimization Benchmark for Real-World Workloads on Ascend NPUs🟡Fairly easy