Files
zed/crates/eval_cli
Ben Brandt d67bbfda3c agent: Use receipts and reported state for native turns (#65420)
Activate native acceptance and reported state atomically with its
completion consumers.

- Return acceptance with the retained message ID. Session-owned drivers
report running/requires-action/idle independently of receipt and
completion observers.
- Keep completion observers native-only for subagents and eval. Native
no longer implements the legacy completion-based prompt path; external
v1 behavior and SDK/wire rollout pins remain unchanged.
- Preserve checkpoints, rewind, command expansion order, retained source
fields, usage and provider-shaped persistence. Compact markers retain
identity without user bubbles.
- Use `NativeRetryAction` for retained command intent. Failed
preparation retries the resolved action; prepared history resumes
without duplicate expansion.

Prerequisites #65502 and #65504 are merged. This PR targets `main`;
conflicts are resolved and only the six-file native slice remains.

Validation on the merged base: **1,815 tests passed, 11 ignored**;
100-seed native/subagent/E2E-helper/skill-body checks; eight-crate
Clippy; test-target and E2E-feature compilation; both Zed binary checks;
formatting and diff checks. Scoped conflict-resolution review passed.
Credentialed live E2E/provider, live SIGTERM and non-macOS workflows
remain unrun.

Review thread:
https://delta.dev/trunk/join/thread_01m4e0prq2aaq6k0avcqe3688r#s=Deoszm1s

Release Notes:

- N/A
2026-10-14 19:28:02 +00:00
..
…
2026-09-11 09:13:44 +00:00
…

eval-cli

Headless Rust binary for running Zed's agent in evaluation and benchmark environments. It is designed for containerized harnesses such as Harbor and Pier, where the repository is already checked out and model API keys are provided via environment variables.

eval-cli uses the same NativeAgent + AcpThread pipeline as the production Zed editor: a full agentic loop with tool calls, subagents, and retries, without a GUI.

This directory also contains zed_eval/, the Python zed-eval package used to build this binary, launch remote benchmark runs on Modal/Harbor/Pier, and fetch results. For normal benchmark orchestration, start with zed_eval/README.md.

Building

Native, for local testing on the same OS

cargo build --release -p eval_cli

Linux x86_64, for Harbor/Pier sandboxes

Harbor and Pier containers run Linux x86_64. From the repository root, use the Docker-based build script:

crates/eval_cli/script/build-linux

This produces target/eval-cli, an x86_64 Linux ELF binary. You can also specify a custom output path:

crates/eval_cli/script/build-linux --output ~/bin/eval-cli-linux

Standalone usage

eval-cli \
  --workdir /testbed \
  --model anthropic/claude-sonnet-4-6 \
  --instruction "Fix the bug described in..." \
  --timeout 600 \
  --output-dir /logs/agent

eval-cli reads provider API keys from environment variables such as ANTHROPIC_API_KEY and OPENAI_API_KEY. It writes result.json, thread.md, and thread.json to the output directory.

Exit codes

Code Meaning
0 Agent finished
1 Error, such as model/auth/runtime failure
2 Timeout
3 Interrupted by SIGTERM or SIGINT

Running benchmarks

Most benchmark runs should use the Python zed-eval CLI instead of invoking eval-cli directly. From the repository root:

crates/eval_cli/script/install-zed-eval
zed-eval doctor --create-volume
zed-eval run rf --from local --n-tasks 2

For one-off source runs without installing the tool globally, use crates/eval_cli/script/zed-eval <args>.

See zed_eval/README.md for supported benchmarks, remote builds, Modal setup, reporting, rejudging, baselines, and Harbor/Pier installed agent usage.