Carry SDK v2 content through outbound composition, drafts, queues, and submissions. Shared prompt inputs use v2 requests; existing v1/native adapters still own wire conversion. **This does not enable a v2 backend or change protocol selection.** - Preserve full source in drafts and submission records, including unknown v2 payloads and metadata. Native draft storage reads valid legacy JSON without a database version bump. - Keep legacy turn-completion responses distinct from v2 acceptance receipts. Receipt transports receive exact v2 content without a legacy representability gate. - Lower complete requests only at v1/native adapter entry. Borrowed, transport-aware preflight rejects before turn cancellation, optimistic history, queue removal/processing effects, or backend retry. - Keep unsupported composer/queue source authoritative while rendering a read-only projection. Prevent projection autosave/resend, including queue blur and recovery/authentication restoration. An explicit **Discard draft** action clears and unlocks a protected composer. ## Review guide - [Shared transport and receipt contracts](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/acp_thread/src/connection.rs#L203), [request lowering](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/acp_thread/src/content.rs#L4), and [source ownership](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/acp_thread/src/submission.rs#L65). - [Core send/retry preflight](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/acp_thread/src/acp_thread.rs#L6049); actual [v1](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent_servers/src/acp.rs#L1879) and [native](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent/src/agent.rs#L2835) adapters. - [Queued dispatch](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent_ui/src/conversation_view/thread_view.rs#L2612), [queue blur preservation](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent_ui/src/conversation_view/thread_view.rs#L2539), and [explicit draft discard](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent_ui/src/conversation_view/thread_view.rs#L4926). - [Native steering preflight](https://github.com/zed-industries/zed/blob/cf591b00a001c412e6f5b20242da233877b19469/crates/agent_ui/src/conversation_view/thread_view.rs#L2595) also gates the end-at-boundary flag; the existing test checks the actual native flag for supported and unsupported source. Release Notes: - N/A
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.