# Harness Improvement
Generated: 2026-11-11T10:30:37.866Z
Source build: local
Canonical docs: https://teammately.ai/docs
---
id: improve.overview
title: Harness Improvement
summary: Improve candidate behavior with Lemon Goal or give your coding agent a scoped External Agents task.
kind: concept
product_area: improve
status: stable
updated: 2026-11-06
canonical: /docs/improve
---
# Harness Improvement
Harness improvement offers two ways to act on benchmark results: **Lemon Goal** coordinates goal-driven work inside Teammately, and **External Agents** prepares a task for your coding agent in your own repository.
## Definition
Lemon Goal starts from a selected saved Harness and measurable criteria. It creates the Goal and its Session together, preserves the original instructions and follows candidate changes through actual evaluations.
External Agents pins a Benchmark Version and optionally selected criteria or a reference Run. It supplies the correctness context while your agent changes the real application. A Teammately Harness or source upload is optional for that path.
## Decision checkpoint
| Need | Choose | Boundary |
| --- | --- | --- |
| Evolve a saved Harness toward numerical targets | Lemon Goal | Recorded Goal, Session, candidates and evaluations |
| Change application code in your own environment | External Agents | Copied task and exact benchmark context |
| Clarify a mistaken standard | Expert Contribution or Correctness Governance | Human judgment and artifact approval |
| Add missing input situations | Coverage Design | Requirements and explicit Case adoption |
## Work with Lemon Goal
Choose the starting Harness, criteria, permitted direction and execution settings. Read actual starting measurements where available; missing measurements stay unmeasured. Starting creates the Goal and begins its Session, capturing your targets and original instructions together.
Use the conversation to read the agent's conclusions, answer explicit questions and provide authorized steering. Goal, Results, Evolution and Harnesses expose the current purpose, measurements, candidate history and source artifacts.
Completed means the agent concluded its work. Read the reported outcome to determine whether the Goal was achieved. Stopping a Session preserves its recorded work.
## Work with an external agent
Copy the task from External Agents. Your coding agent retrieves the pinned context, inspects your repository and carries out the requested implementation and evaluation. The agent works in your repository while Teammately supplies the selected benchmark context and assessment results.
Imported responses and managed Harness executions return to ordinary Benchmark Evaluations. Your engineer reviews the comparison and decides which implementation changes to adopt.
## Keep the responsible object clear
A candidate failure can expose an incorrect Case, an applicability problem or a missing coverage slice. Fixing candidate code is not the answer to every benchmark discrepancy. Preserve the exact candidate and Benchmark Version so the next action can be assessed from the same recorded population.
## Related reference pages
{% related-card-grid title="Related reference pages" %}
- [Start a Lemon Goal Session](/docs/improve/start-improvement-session)
- [Lemon Goals](/docs/improve/goals)
- [Work with External Agents](/docs/improve/external-agents)
- [Candidates and Results](/docs/improve/candidates-and-frontier)
- [Session Conversation and History](/docs/improve/chronology-and-trajectories)
- [Lemon Goal](/docs/concepts/lemon-goal)
{% /related-card-grid %}
---
id: improve.candidates-frontier
title: Candidates and Results
summary: Interpret exact candidate Harness Versions, comparable evaluations, constraints, and retained results in a Lemon Goal Session.
kind: reference
product_area: improve
status: stable
updated: 2026-10-30
canonical: /docs/improve/candidates-and-frontier
---
# Candidates and Results
## Definition
A candidate is an identifiable Harness change examined during a Lemon Goal Session. Its source, ancestry, accepted Goal and actual evaluations explain what was attempted and what the result supports.
## Fields, states, or lifecycle rules
- An evaluated candidate identifies an exact saved Harness Version.
- Results retain the Benchmark Version and measurement population.
- Starting evaluation and candidate evaluation have different roles.
- A missing, failed or incomparable evaluation does not establish improvement.
- Retained candidates remain distinguishable from every explored draft or branch.
## Read Results
Open the Session's **Results** panel to inspect candidate outcomes and comparison context. Its Evaluations view links the recorded executions. Check completeness and criteria before interpreting a lead.
A candidate can improve one target while violating another constraint. Keep that tradeoff visible. A high overall score cannot replace a missing judgment on a protected criterion.
The retained result is not automatically the newest candidate. An unsuccessful direction can still explain why the agent tried another change, while an incomparable result cannot justify a numerical improvement claim.
## Read Evolution
Evolution connects progress and execution history. Strategies describe the approaches used in the Session. The chart remains available after work ends; Session completion does not erase the sequence that produced the result.
Use **Harnesses** to inspect the actual candidate artifacts rather than inferring code changes from narration. Saving or evaluating a candidate is distinct from deciding to use it in a future benchmark execution.
## Population and history
Compare against the same Benchmark Version and recorded conditions. Ordinary candidate scores use the reference Run selected before outcomes were known. Extra independent Runs retain their own history instead of silently contributing only their best Trials.
A focused observation can guide exploration without replacing the complete comparison required by the Goal. Read the reported conclusion and its measurements before deciding how to use the resulting candidate.
## Related task pages
{% related-card-grid title="Related task pages" %}
- [Lemon Goals](/docs/improve/goals)
- [Session Conversation and History](/docs/improve/chronology-and-trajectories)
- [Evaluation Results](/docs/benchmark-evaluations/results)
- [Harnesses](/docs/assets/harnesses)
{% /related-card-grid %}
---
id: improve.chronology-trajectories
title: Session Conversation and History
summary: Follow Lemon Goal messages, questions, progress, candidate history, and measured results.
kind: reference
product_area: improve
status: stable
updated: 2026-11-06
canonical: /docs/improve/chronology-and-trajectories
---
# Session Conversation and History
## Definition
The Session conversation presents the user's original instructions, the agent's messages, explicit questions and linked artifacts. History connects those messages to observable candidate work and evaluation results.
## Fields, states, or lifecycle rules
| Status | Meaning |
| --- | --- |
| Working | Agent work, child work, evaluation or ordinary background delivery is ongoing |
| Waiting for your answer | An explicit question requires a response |
| Completed | The agent concluded; read the actual reported outcome |
| Stopped | The Session's work was stopped |
| Something went wrong | An execution problem needs attention |
Ordinary background delay is not a request for the user to repair or advance the Session. A Completed status is not by itself a statement that the Goal was achieved.
## Session panels
- **Goal** shows criteria, measurements, the starting Harness and recorded original instructions.
- **Results** combines candidate results and comparison context with an Evaluations view.
- **Evolution** combines progress and execution history with Strategies.
- **Harnesses** shows the related candidate source artifacts.
- **Details** retains supporting records, subagents and token usage.
Open an artifact's owning panel rather than treating every mention as a new object. Read the exact measurement behind a conclusion, including any unavailable or incomplete result.
## Observable work
Narration can explain an action and link to its recorded result. It does not disclose hidden reasoning or certify private work outside the product. A source change, an evaluation request and a completed result remain different events.
History can span multiple pages. The first visible portion is not necessarily the complete Session. Preserve ordering and original instructions when interpreting a later correction or steering message.
## Stop and conclusion
Use the available stop control when further work should cease. Read confirmation of that request separately from the recorded results that already exist. Stopping preserves history and the Evolution chart.
External Agents is a different workflow: copying a task there does not create a hosted Session or let Teammately observe the coding agent's private conversation.
## Related task pages
{% related-card-grid title="Related task pages" %}
- [Start a Lemon Goal Session](/docs/improve/start-improvement-session)
- [Candidates and Results](/docs/improve/candidates-and-frontier)
- [Work with External Agents](/docs/improve/external-agents)
{% /related-card-grid %}
---
id: improve.work-evolve
title: Work with External Agents
summary: Copy a benchmark-scoped task for your coding agent to implement and evaluate in your real application repository.
kind: task
product_area: improve
status: stable
updated: 2026-10-30
canonical: /docs/improve/external-agents
---
# Work with External Agents
External Agents gives your coding agent a concrete improvement task grounded in the selected Benchmark Version. The agent works in your real repository; Teammately supplies the applicable Cases, Policies, Rubrics and recorded results.
## Prerequisites
- A selectable Benchmark Version.
- Access to the application repository and authorization for the intended changes.
- A coding agent connected through the setup supplied with the task.
- An optional reference Run that genuinely represents the application starting point.
## Steps
1. Open **Harness improvement → External Agents**.
2. Select the Benchmark Version. Changing it clears local criterion and reference-Run selections.
3. Focus on the whole Benchmark or choose up to 20 approved and applicable Policy and Rubric Versions.
4. Optionally select one individual reference Run. No Run is silently selected.
5. Choose the allowed improvement direction: supported practices, prompt only, model only, the same model family, or model configuration only.
6. Copy the task, including setup instructions when needed, into your coding-agent conversation.
7. Have the agent inspect the actual repository, retrieve the pinned criteria and Run context, implement the change and evaluate it.
8. Inspect resulting Runs through ordinary Benchmark Evaluations.
The copied task includes the Project Agent Brief when present. Credentials do not belong in that text.
## Execution choices
A Teammately Harness and source upload are optional. Customer-executed responses are the default path for the agent's real application. Managed Harness execution requires a deliberate choice.
The product data MCP supplies read-only context, instructions, results and comparisons. The CLI owns local files and submission operations. The documentation MCP only retrieves these manuals.
Start with [CLI authentication](/docs/cli/authentication) and [product MCP setup](/docs/cli/mcp), then follow [external output submission](/docs/cli/external-outputs) or the optional [managed Harness workflow](/docs/cli/managed-harness).
## Object and state changes
The composer keeps selections locally and copies text. It creates no hosted agent Session, transcript, durable handoff object, automatic code adoption or Harness activation. Later submitted responses or managed execution create their own ordinary Run records.
## Success criteria
- The task preserves the intended Benchmark Version and criteria.
- A selected reference Run is checked against actual code.
- Implementation and comparison use actual pre-change and post-change behavior.
- Accepted responses and candidate identity remain attributable.
## Common failure modes
- Stopping after tool setup or context retrieval.
- Assuming a Harness upload is mandatory.
- Treating copied text as an executed Session.
- Using a reference Run from unrelated code.
- Claiming private agent work before returned artifacts or results exist.
## Related reference pages
{% related-card-grid title="Related reference pages" %}
- [Harness Improvement](/docs/improve)
- [Import External Evaluation Outputs](/docs/benchmark-evaluations/output-mapping)
- [Evaluation Results](/docs/benchmark-evaluations/results)
- [Project Context](/docs/agent-setup/project-context)
{% /related-card-grid %}
## Related troubleshooting pages
{% related-card-grid title="Related troubleshooting pages" %}
- [Output mapping troubleshooting](/docs/troubleshooting/output-mapping)
- [Permissions troubleshooting](/docs/troubleshooting/permissions)
{% /related-card-grid %}
---
id: improve.goal-contracts
title: Lemon Goals
summary: Define measurable candidate targets and constraints while preserving exact units, starting measurements, and original instructions.
kind: reference
product_area: improve
status: stable
updated: 2026-10-30
canonical: /docs/improve/goals
---
# Lemon Goals
## Definition
A Lemon Goal states the measured result a saved Harness should reach and the directions permitted to get there. Its accepted target identities, conditions, units and original instructions explain later candidate work.
## Fields, states, or lifecycle rules
- A criterion refers to an exact benchmark metric, Policy, Rubric or Case scope.
- Conditions can express absolute thresholds, increases, decreases or preservation where supported by that metric.
- Resource criteria keep their actual units, such as latency, tokens or cost.
- Starting measurements are recorded when available; an absent measurement is shown as unmeasured.
- The Goal and its Session are created together.
- Original accepted instructions and earlier results remain attributable.
## Define numerical criteria
Choose the criterion and a supported condition. Read the unit before entering the target: a score percentage, a count and a latency value have different meanings.
An absolute target states a threshold. A relative target states a change from the relevant starting measurement. Preserve the exact relationship rather than substituting a rounded display value. Percentage reduction from a measured zero cannot be interpreted as a positive reduction.
Choose constraints and an improvement direction that match the authorized scope. The available direction options can restrict work to prompts, model choice, a model family or configuration. They do not select a fixed implementation strategy for the agent.
## Starting point
Select the saved Harness Version whose behavior should change. Inspect existing comparable measurements when present. An initial evaluation is not a universal creation prerequisite; the current target and admission rules determine what remains to be measured.
Missing data does not become a zero score, inferred baseline or invented success claim. The Session keeps starting evaluation and candidate evaluation distinct.
## Traceability
Users edit or submit the current Goal through its supported controls. Accepted settings and instructions are captured automatically for interpretation and replay. Users do not need to name, publish or manage a separate prompt/configuration version.
Read Goal, Results and Evolution together when deciding whether a candidate satisfied the requested outcome. A completed Session and an achieved Goal are different statements.
## Related task pages
{% related-card-grid title="Related task pages" %}
- [Start a Lemon Goal Session](/docs/improve/start-improvement-session)
- [Candidates and Results](/docs/improve/candidates-and-frontier)
- [Run Details and Metadata](/docs/benchmark-evaluations/run-details)
{% /related-card-grid %}
---
id: improve.start-session
title: Start a Lemon Goal Session
summary: Choose a saved Harness, numerical criteria, permitted changes, and execution settings, then start goal-driven work.
kind: task
product_area: improve
status: stable
updated: 2026-10-30
canonical: /docs/improve/start-improvement-session
---
# Start a Lemon Goal Session
Start a Session when you want Teammately to improve a saved Harness toward an explicit measured outcome.
## Prerequisites
- A selected Benchmark Version and saved starting Harness.
- Permission to start work in that scope.
- Measurable criteria and a clear boundary for permitted changes.
- An available execution machine and model choice from the supplied catalog.
## Before and after
| Before | After |
| --- | --- |
| A saved candidate and intended change | An accepted Goal with exact criteria |
| Available starting measurements | Recorded starting context, with missing values kept unmeasured |
| Free-form instructions | Original instructions attached to the new Session |
| Candidate work has not started | The Goal and Session are created together |
## Steps
1. Open **Harness improvement → Lemon Goal**.
2. Choose the saved Harness Version to improve.
3. Add numerical criteria and check their supported conditions, units and target values.
4. Select the permitted improvement direction and write any additional instructions.
5. Review available starting measurements. Missing initial results do not require inventing a baseline.
6. Choose the machine, execution count, candidate settings and available model option.
7. Review the selected scope and start the Session.
8. Follow the conversation. Answer an explicit question when one appears, and inspect Goal, Results, Evolution and Harnesses as work progresses.
The agent chooses useful actions within the accepted scope. Selecting a direction does not prescribe a fixed sequence of semantic steps.
## Object and state changes
Starting records the Goal and Session atomically. Subsequent work can produce candidate Harness Versions, evaluations, findings and usage records. Accepted inputs remain attached to that work rather than being rewritten by later project settings.
## Success criteria
- Criteria refer to the intended objects and preserve their actual units.
- The saved starting Version and original instructions are identifiable.
- Candidate conclusions refer to actual recorded measurements.
- Completion is interpreted from the reported outcome, not status alone.
## Common failure modes
- Selecting a different saved Version than intended.
- Mistaking unmeasured values for zero.
- Using a rounded display as the exact target formula.
- Treating Session completion as proof that every criterion was achieved.
- Using candidate work to hide a mistaken Case or Rubric.
## Related reference pages
{% related-card-grid title="Related reference pages" %}
- [Lemon Goals](/docs/improve/goals)
- [Candidates and Results](/docs/improve/candidates-and-frontier)
- [Session Conversation and History](/docs/improve/chronology-and-trajectories)
- [Evaluation Results](/docs/benchmark-evaluations/results)
{% /related-card-grid %}
## Related troubleshooting pages
{% related-card-grid title="Related troubleshooting pages" %}
- [Benchmark run troubleshooting](/docs/troubleshooting/benchmark-runs)
- [Benchmark Results Changed Unexpectedly](/docs/troubleshooting/benchmark-results-changed-unexpectedly)
{% /related-card-grid %}
---
id: concepts.coevolve
title: Lemon Goal
summary: Use benchmark results to explore candidate improvements and return unresolved correctness or coverage questions to their owning workflows.
kind: concept
product_area: coevolve
status: stable
updated: 2026-11-06
canonical: /docs/concepts/lemon-goal
---
# Lemon Goal
Lemon Goal improves a saved Harness toward a benchmark objective through candidate experiments in Teammately. A useful change has an identifiable implementation, an explicit Goal and actual results.
## Definition
Open **Harness improvement → Lemon Goal** to define the measured outcome, starting Harness and permitted changes. Lemon Goal investigates failures, develops candidates and tests them through Trialground.
**Harness improvement** also contains **External Agents**, a separate workflow that supplies a scoped task and pinned benchmark context for your coding agent in your own repository. Both workflows preserve the selected Benchmark Version and criteria.
## Decision checkpoint
| Situation | Choose | Inspect |
| --- | --- | --- |
| A saved Harness should meet numerical targets | Lemon Goal | Accepted criteria, candidate Versions and evaluations |
| Application code should change in your repository | External Agents | Pinned task context and actual before/after behavior |
| A result exposes an unclear rule | Expert Contribution | Specialist judgment and artifact decisions |
| Important input situations are missing | Coverage Design | Requirements and explicit Case adoption |
## Learn from actual results
Inspect the full planned population before deciding a candidate is stronger. A focused success can guide another direction without replacing the complete comparison required by the Goal.
A candidate can gain on one criterion and regress another. Retained results and the Session's Evolution history should make that tradeoff explainable. A new Version is not automatically the best candidate.
## Preserve the goal and the work
Lemon Goal records original instructions, targets and the starting candidate. Its conversation and Goal, Results, Evolution and Harnesses panels connect requested work to returned artifacts and measurements. A completed Session means the agent concluded; the reported outcome explains whether the Goal was achieved.
External Agents relies on the coding agent to inspect actual customer code, implement within the permitted scope and submit supported results. Setup or retrieval alone does not complete that task.
## Return new questions upstream
Candidate work may expose a mistaken Case, unresolved applicability or an unrepresented input condition. Route those questions to the owning governance, expert or coverage workflow. Do not hide a broken standard by changing the candidate until it passes an ambiguous test.
Return the finding to the relevant expert, governance, or coverage workflow so your team can decide how it should affect the benchmark.
## Related reference pages
{% related-card-grid title="Related reference pages" %}
- [Harness Improvement](/docs/improve)
- [Start a Lemon Goal Session](/docs/improve/start-improvement-session)
- [Work with External Agents](/docs/improve/external-agents)
- [Coverage Design](/docs/coverage-design)
- [Request an Expert Contribution](/docs/expert-contributions/request-contribution)
{% /related-card-grid %}