You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: repair five swe-bench-pro seed-agent defects that corrupt the reward
Each of these silently biases the measurement rather than failing loudly,
so the optimizer would have hill-climbed against a broken baseline.
1. REPO_DIR was `/app/repo`. The swebenchpro task images set `WORKDIR
/app` and reset the checkout in place there, and the task instruction
says so verbatim ("I've uploaded a code repository in the directory
/app"). Every shell command ran in a directory that does not exist.
2. `reasoning: {effort: high}` was sent unconditionally. Non-reasoning
models reject it with a hard 400 on the very first turn, so a gpt-4o
run could not complete a single trial. Gated on capability, matching
the sibling agents.
3. `_write_file` joined a model-supplied path onto `logs_dir`. Models
routinely answer with the absolute path they just saw in shell output,
and `Path(logs_dir) / "staged" / "/app/x.py"` discards the left side
entirely, so the write landed on the HOST root and killed the trial
with `OSError [Errno 30] Read-only file system: '/app'`. Seen on 2 of
the first 12 held-out trials. Paths are now normalized repo-relative
and traversal is refused.
4. Exhausting the turn budget raised RuntimeError. Reward comes from the
task's hidden suite run against whatever the agent left in the
repository, so raising discarded real edits, errored the trial, made
harbor re-run the whole thing (9 of the first 49 held-out trials) and
scored a hard 0 for a fix that may well have been correct. It now
records the exhaustion in metadata and lets the verifier grade, which
is exactly what the "model stopped calling tools" branch already did.
5. Harbor decodes exec output as strict UTF-8. These are real
repositories, so a model that cats or greps a binary raised
UnicodeDecodeError out of `exec` and killed the trial: 5 of the first
49 held-out trials. A non-decodable stream is now a tool error the
model can react to, with a hint to re-run through `strings`/`file`.
Verified end to end: a single-case smoke on
instance_ansible__ansible-0ea40e with a gpt-4o agent completed with
reward 1.0, all 16 required tests PASSED, 0 errored trials.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments