Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

LangChain 8 min read Case study mediumAdept

Improving Deep Agents with harness engineering

Changing only the harness around a fixed model (gpt-5.2-codex) raised deepagents-cli from 52.8% to 66.5% on Terminal Bench 2.0, moving it from outside the top 30 to the top 5. The gains came from an automated trace-analysis loop over LangSmith traces and targeted changes to the system prompt and middleware. These included a pre-completion checklist that forces a verification pass, injected directory and tool context, time-budget warnings, and loop detection after repeated edits to the same file. A high-xhigh "reasoning sandwich" that spends more compute on planning and verification beat running at xhigh throughout, which scored 53.9% because of timeouts. Harnesses also need tailoring per model: Claude Opus 4.6 scored 59.6% on an earlier harness that had not been through the same improvement loop.

Assumes: LLM coding agentsagent tool callingprompt engineering

Related posts

  • Open-source DeepResearch – Freeing our search agents

    Hugging Face mediumAdept

    Hugging Face reproduced OpenAI's Deep Research agent in about 24 hours using the open smolagents framework and reached 55.15% on the GAIA validation set, up from roughly 46% for the previous open state of the art (Magentic-One). OpenAI reports 67.36%. Most of the gain comes from a CodeAgent that writes its actions as Python code instead of JSON tool calls. Swapping in JSON actions on the same setup drops the score to 33%. Code actions need about 30% fewer steps and tokens and handle multimodal state more easily. The toolset is deliberately simple: a text-based web browser and a file inspector borrowed from Magentic-One. Next steps are vision-based GUI browsing and benchmarking open models such as DeepSeek R1.

  • Agent-driven development in Copilot Applied Science

    GitHub Engineering mediumAdept

    A Copilot Applied Science researcher built eval-agents, a set of Copilot SDK-based agents that automate analysis of coding-agent trajectories from benchmarks like TerminalBench2 and SWEBench-Pro, and developed it primarily through coding agents. Three principles made this work: conversational, verbose prompting in plan mode; continuous refactoring, documentation and dead-code cleanup so the repo is easy for agents to navigate; and a "blame process, not agents" approach backed by strict typing, linters, and human-only contract tests that prevent agents from rewriting regression tests. With this setup five contributors added 11 agents and four skills in under three days, using a loop of /plan, /autopilot, automated Copilot Code Review iterations, and human review, plus weekly agent-run audits for missing tests, duplication and doc gaps.

  • Introducing harness adapters: adapt your favorite model to your harness to improve performance and cost

    Hugging Face hardMaster

    RL-training a LoRA adapter for a specific agent harness and task distribution makes a frozen base model both more accurate and cheaper: Qwen3.8-27B under the pi harness rises from 39% to 55% pass@1 on Terminal-Bench 2.1 while average token usage drops from 2.9K to 1.5K per task, mostly because the model reasons less and calls fewer tools. The recipe trains one adapter per harness (pi, OpenCode, Hermes Agent) inside the unmodified harness, using a proxy to vLLM and TRL's AsyncGRPOTrainer. It builds a validated, difficulty-filtered task set from SWE-smith, SWE-Gym and Tasksmith-generated PR tasks using openenv validate, keeping only tasks the base model solves sometimes. The post also covers learning-rate sweeps (settling on 2e-5), a small tool-efficiency reward bonus, safeagents guardrails during rollouts, and merging the three nearly orthogonal adapters into one super-adapter that works across all harnesses.

  • How to build and maintain an agentic evaluation

    Hugging Face mediumAdept

    Agentic evaluations depend on far more than the model: task instructions, agent harness, environment, verifier and traces can each move a score, with harness changes alone shifting Terminal-Bench accuracy by up to 29.9 points. A worked example adapts Terminal-Bench's raman-fitting task into an eight-task physics benchmark using Harbor. Testing the grader with a do-nothing agent and a shortcut showed a ratio-only verifier could be fooled, and reading traces showed gpt-oss-120b mostly failed by declaring completion early rather than by fitting badly. The authors recommend reporting pass^k alongside pass@k, pinning inference providers, validating graders against shortcuts, and publishing tasks, graders and traces so outside reviewers can find and correct benchmark errors.

  • The Most Common Questions About Agent Evals, Answered

    LangChain mediumAdept

    Agent evals score agent runs to handle nondeterminism, multiple valid answers and variable execution paths: start by reading traces, pick one behavior, build a 10-20 example dataset from real traces, run a baseline experiment, and fold new failures back in. Offline evals compare versions against datasets before shipping, while online evals score sampled production traces without reference outputs. Use code evaluators where possible, LLM judges with narrow binary questions calibrated against human review, and pairwise comparison for choosing variants. Container-based benchmarks like Terminal-Bench (run via the open-source Harbor harness) score the end state of an environment for long multi-step tasks, and online costs can be controlled through sampling, filters, code checks and cheaper judge models.

The quest for software engineering knowledge.

Look:
Layout: