Skip to content

Say why the fork eval replays a transcript, and which prefix it sends - #6570

Merged
max-sixty merged 2 commits into
mainfrom
fork-eval-composed-requests
Nov 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fork-eval-composed-requests

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The fork eval's module header said the replay keeps the tool definitions a live fork resends. It sends claude -p's headless prefix instead: the Agent SDK identity line, a 4,300-character system prompt and 12 tools, where an interactive session's request carries the Claude Code CLI identity, 15,800 characters and 21 tools (captured /v1/messages bodies). The header now says so, and records why the replay resumes a transcript rather than asking the fork in one composed message: that route passes all 35 cases' deterministic checks for a quarter less, but on source-edited under the line fork prompt before #6477 it handed the source read over 0 times of 12, against the replay's 7 of 22 across this run and #6477's.

Docstring only; no behavior changes. Max asked whether the fork evals could score a request we compose; the full comparison, with the terms on running the Agent SDK on a subscription login, is on a Leaf page in that thread. Fork replay smoke tests pass.

This was written by Claude Code on behalf of max-sixty

The header said the replay keeps the tool definitions a live fork resends. It
sends `claude -p`'s headless prefix: "You are a Claude agent, built on
Anthropic's Claude Agent SDK.", a 4,300-character system prompt and 12 tools,
where an interactive session's request carries "You are Claude Code, Anthropic's
official CLI for Claude.", 15,800 characters and 21 tools (captured
`/v1/messages` bodies on Claude Code 2.1.329; a live session's
`api-request-shape` on 2.1.328).

The header now also says why the replay resumes a transcript rather than asking
the fork in one composed message, which the Agent SDK can send on the login.
Measured 2026-11-19 with that route (`claude -p --system-prompt <the headless
text> --tools ""`, the conversation as `conversation_text` renders it, then the
prompt), comparing the two requests whole, since they also differ in tools and
reminders:

- All 35 fork cases, one sample each: both routes pass every deterministic
  check (the text judges weren't run). List-price cost $2.14 against the
  replay's $2.84; 6,300 input tokens per case against 24,500.
- `source-edited` on the arm before #6477: the replay handed the read of the
  page's source over 3 times of 12 (4 of 10 in #6477's own run), the composed
  message 0 of 12; pooled, 7 of 22 against 0 of 12, Fisher p = 0.04. #6477
  measured 29 of 60 on three journey sessions' own conversations sent with
  nothing after the prompt. The composed forks wrote 56 output tokens on average
  there, the replay's 230.

Sending a live fork's request exactly needs a Messages API client: on an API
key, which `eval run` keeps out of evals, or on the login token Promptfoo's
`anthropic:messages` takes from the keychain.
@max-sixty
max-sixty merged commit af9779e into main Nov 20, 2026
6 checks passed
@max-sixty
max-sixty deleted the fork-eval-composed-requests branch November 20, 2026 06: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.

2 participants