Skip to content

fix(eval): drive CLI-harness agents (claude/codex) with the prompt at launch#126

Merged
vu1n merged 1 commit into
mainfrom
eval/cli-agent-launch-prompt
Jun 22, 2026
Merged

fix(eval): drive CLI-harness agents (claude/codex) with the prompt at launch#126
vu1n merged 1 commit into
mainfrom
eval/cli-agent-launch-prompt

Conversation

@vu1n

@vu1n vu1n commented Jun 22, 2026

Copy link
Copy Markdown
Owner

The seg harness drove every agent via launch-empty-then-session send (opencode's server model). claude/codex are one-shot agent -p PROMPT — the prompt must be at launch, and a later send can't drive a one-shot. So AGENT=claude booted a VM that never ran a turn → all cells 0.0 at $0 cost.

Verified live: run --detach --agent claude -- "<prompt>" → wait-idle → work lands (model claude-opus-4-8). Fix is scoped to the monolithic arm; opencode path byte-identical.

This unblocked the Opus bar for the cost-quality comparison — Opus solo 0.880 beats the cheap heterogeneous best-of-3 fanout 0.819 (win concentrated on the hard ap_dot_dsl: 0.639 vs 0.525), and Opus is ~free on subscription vs the fanout's real $0.264/run. Verdict: just use Opus.

Follow-up (flagged, not fixed): dispatch's WorkerDriver drives the same detach-then-send way, so dispatch --agent claude (the default) likely can't drive claude either — needs the same launch-with-prompt fix.

… launch

The seg harness drove every agent via launch-empty-then-`session send` — the
opencode *server* model (`/prompt`). But claude/codex are one-shot CLI harnesses
(`agent -p PROMPT`): the prompt must be at LAUNCH, and a later `session send`
can't drive a one-shot. So an `AGENT=claude` monolithic run booted a VM that never
ran a turn → all cells scored 0.0 at $0 cost (real boot time, no work).

Verified via a controlled run: `run --detach --agent claude -- "<prompt>"` →
wait-idle → the work lands (model=claude-opus-4-8). Fix:
- `pb_run_session` takes an optional launch prompt; for a CLI-harness agent it
  passes `--detach -- "$prompt"` (server agents unchanged — launch idle, drive via
  send).
- `run_monolithic_cell` branches: opencode → launch idle + `drive_bounded`; CLI →
  launch-with-prompt + wait-idle (no send).

Backwards-compatible (opencode path byte-identical). Scope: the monolithic arm.
The chained/segmented arms still send per-segment (a one-shot CLI agent can't do
multi-turn chaining anyway — a deeper question, left for later).

NOTE (follow-up, not fixed here): `dispatch`'s WorkerDriver drives the same
detach-then-send way, so `dispatch --agent claude` (the default) likely has the
same can't-drive bug and needs the same launch-with-prompt treatment.
@vu1n vu1n merged commit e1f6e41 into main Jun 22, 2026
@vu1n vu1n deleted the eval/cli-agent-launch-prompt branch June 22, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant