Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
c952ce8
Streamline ExploitBench around the original image tools
pabloRom2004 Sep 7, 2026
437dc72
Add minimal ReAct default with token-budget reminders
pabloRom2004 Sep 7, 2026
ed753bb
Format the supplied README using the HLE section structure
pabloRom2004 Sep 7, 2026
90d6561
Add native ReAct shell tools
pabloRom2004 Sep 7, 2026
c440673
Standardize the eval entrypoint as task.py
pabloRom2004 Sep 7, 2026
1baa60b
Align default and original configuration keys
pabloRom2004 Sep 7, 2026
71711dc
Rename agents to default and original
pabloRom2004 Sep 7, 2026
8757f43
Update task.py
pabloRom2004 Sep 7, 2026
4ac0749
Preserve capability flags across epochs and enable native ReAct submi…
pabloRom2004 Sep 7, 2026
a0f7538
Configure harnesses through HLE-style native solver sections
pabloRom2004 Sep 7, 2026
08e3f5d
Separate YAML configuration arguments with blank lines
pabloRom2004 Sep 7, 2026
2432221
Keep YAML entries compact within top-level blocks
pabloRom2004 Sep 7, 2026
4352f59
Simplify run configs and report average and maximum flags
pabloRom2004 Sep 7, 2026
d78d604
Use xhigh reasoning in both run configurations
pabloRom2004 Sep 7, 2026
f0350bf
Rename agent modules to agent_default and agent_original
pabloRom2004 Sep 7, 2026
a2ae4ed
Document selecting individual challenge images in run configs
pabloRom2004 Sep 7, 2026
6fa117c
Remove unused message limit from run configurations
pabloRom2004 Sep 7, 2026
603783a
Updated wording
pabloRom2004 Sep 7, 2026
7e9732b
Use native tool output limits and provider-default temperature
pabloRom2004 Sep 7, 2026
9efeca2
Leave sandbox concurrency to the run environment
pabloRom2004 Sep 7, 2026
c2f1af5
Use only the token budget for default attempt limits
pabloRom2004 Sep 7, 2026
2917169
Keep the default time limit visible as null
pabloRom2004 Sep 7, 2026
b966689
Score recorded progress after agent errors and continue evaluations
pabloRom2004 Sep 7, 2026
c1d1bbe
Verify ReAct stopping and ungraded-attempt accounting
pabloRom2004 Sep 7, 2026
9dfaae6
Remind ReAct agents to grade alongside token usage
pabloRom2004 Sep 8, 2026
fe45ead
Document running ExploitBench with Docker on Modal VMs
pabloRom2004 Sep 8, 2026
d010910
Make ReAct token and grading reminders configurable
pabloRom2004 Sep 8, 2026
57373bd
Rename ReAct grade reminder option
pabloRom2004 Sep 8, 2026
76e50b7
Align ExploitBench with HLE structure
pabloRom2004 Sep 8, 2026
09023c3
Rename ExploitBench tasks and add original harness nudging
pabloRom2004 Sep 8, 2026
1d00ce4
Add CLI harnesses and unify ExploitBench task configuration
pabloRom2004 Sep 8, 2026
0b809a3
Consolidate YAML configuration loading
pabloRom2004 Sep 8, 2026
8dac84c
Raise default token budgets to 100 million
pabloRom2004 Sep 8, 2026
a6a8d3f
Continue attempts with configurable nudges and stop on ACE
pabloRom2004 Sep 8, 2026
5babdb3
Remove nudge count cap absent from original implementation
pabloRom2004 Sep 8, 2026
7b9d34d
Disable internet access across all CLI harnesses
pabloRom2004 Sep 8, 2026
aa7913b
Automatically clean up evaluation logs created by pytest
pabloRom2004 Sep 8, 2026
447453c
Align README with HLE and consolidate release version
pabloRom2004 Sep 8, 2026
3a248d1
Update README.md
pabloRom2004 Sep 8, 2026
c991316
Update README.md
pabloRom2004 Sep 8, 2026
86e1af5
Update README.md
pabloRom2004 Sep 8, 2026
40050dc
Update README.md
pabloRom2004 Sep 8, 2026
6c573ed
Update README.md
pabloRom2004 Sep 8, 2026
e843193
Small formatting changes
pabloRom2004 Sep 8, 2026
9ef2b58
If ACE is reached set all 16 flags to true
pabloRom2004 Sep 9, 2026
e626e0c
Document grading flow with a monochrome diagram
pabloRom2004 Sep 9, 2026
7bbb4e9
Handle grading failures with partial credit and agent feedback
pabloRom2004 Sep 9, 2026
be5a661
Update README.md
pabloRom2004 Sep 9, 2026
bb5d149
Use grayscale scoring diagram in README
pabloRom2004 Sep 10, 2026
8ab394d
Simplify scoring diagram borders
pabloRom2004 Sep 10, 2026
0509298
Store intermediate grading evidence in TaskState
pabloRom2004 Sep 10, 2026
5d6d1b1
Updated docs
pabloRom2004 Sep 10, 2026
bc5b865
Refactored default agent and CLI agent
pabloRom2004 Sep 10, 2026
eec2794
Fix OpenCode context output config
pabloRom2004 Sep 10, 2026
154121a
Limit OpenCode context budget
pabloRom2004 Sep 11, 2026
b800eff
Extend Gemini CLI response timeout
pabloRom2004 Sep 11, 2026
b124f17
Use selected evaluation model in OpenCode
pabloRom2004 Sep 11, 2026
b7c765c
Support native Kubernetes sandboxes on Hawk
pabloRom2004 Sep 11, 2026
411c47d
Install Node with CLI extra
pabloRom2004 Sep 11, 2026
bb8439d
Increase Hawk sandbox resources
pabloRom2004 Sep 11, 2026
3bd5d44
Expose bundled npm for Gemini CLI
pabloRom2004 Sep 12, 2026
095c951
Use nodejs-wheel console npm for Gemini
pabloRom2004 Sep 12, 2026
06002f0
Handle OpenCode stream exit
pabloRom2004 Sep 12, 2026
1eff69e
Add native tool timeout for ReAct
pabloRom2004 Sep 12, 2026
9247a3d
Increase grader MCP timeout
pabloRom2004 Sep 12, 2026
0aeaad5
Make OpenCode compact before provider overflow
pabloRom2004 Sep 12, 2026
f99405e
Document explicit OpenCode context for long runs
pabloRom2004 Sep 12, 2026
333ca06
Request streamed usage for OpenCode compaction
pabloRom2004 Sep 12, 2026
a945984
Reserve sandbox storage and require a separate host per sample
pabloRom2004 Sep 14, 2026
853a190
Use native Hawk machine selection for isolated sandboxes
pabloRom2004 Sep 14, 2026
ce45f20
Match sandbox reservations to Hawk worker capacity
pabloRom2004 Sep 14, 2026
7bbc9a8
Tune Hawk sandbox storage
pabloRom2004 Sep 15, 2026
42d4f48
Keep ExploitBench version stable for Hawk resume
pabloRom2004 Sep 15, 2026
9dd6c2d
Remove oversized sandbox disk gate
pabloRom2004 Sep 15, 2026
c99d700
Use smaller sandbox resources for shared-worker smoke tests
pabloRom2004 Sep 15, 2026
0d31905
Reserve sandbox storage and separate ExploitBench workers
pabloRom2004 Sep 16, 2026
3165e32
Keep evaluation failures out of capability scores
pabloRom2004 Sep 16, 2026
82554ec
Keep score-on-error enabled by default
Sep 16, 2026
b93253f
Allow two hours for OpenCode bridge RPCs
pabloRom2004 Sep 16, 2026
6467d9e
Use smaller Hawk sandboxes and regional ECR image caching
pabloRom2004 Sep 16, 2026
f5862fd
Allow explicit Kubernetes node selection for sandbox placement
pabloRom2004 Sep 16, 2026
6da7c1d
Align main with tested live-run settings and timeout fixes
pabloRom2004 Sep 16, 2026
fb86bac
Configure native CLI sandbox polling timeouts
pabloRom2004 Sep 16, 2026
096bff3
Align OpenCode provider timeouts with Inspect
pabloRom2004 Sep 17, 2026
5aae52b
Handle MCP broken-stream teardown race
pabloRom2004 Sep 17, 2026
f618141
Add recoverable CLI evaluation state
pabloRom2004 Sep 17, 2026
4903d39
Accept compact recovery bundles
pabloRom2004 Sep 17, 2026
d7280d8
Fix recovery transcript messages without tools
pabloRom2004 Sep 17, 2026
01fbc06
Restore recovered home ownership
pabloRom2004 Sep 17, 2026
4245991
Support encrypted remote recovery bundles
pabloRom2004 Sep 17, 2026
583bded
Remove cancelled recovery run bundle
pabloRom2004 Sep 17, 2026
0bd92c9
Add configurable task failure handling and ReAct checkpoint recovery …
pabloRom2004 Sep 17, 2026
7f0c591
Use scripted task default without requesting a Middleman model
pabloRom2004 Sep 17, 2026
e26c72a
Merge branch 'main' into codex/react-checkpoint-proof
pabloRom2004 Sep 17, 2026
fcf0226
Preserve checkpoints across all harnesses and scorer retries
pabloRom2004 Sep 17, 2026
586765f
Prefetch verified CLI archives to avoid release API rate limits
pabloRom2004 Sep 17, 2026
b411929
Keep early setup errors visible in scorer recovery probes
pabloRom2004 Sep 17, 2026
30bfd3a
Document twenty-minute checkpoints and retention limits
pabloRom2004 Sep 17, 2026
081916f
Recommend Hawk default ten-minute checkpoints
pabloRom2004 Sep 17, 2026
bb73307
Test upstream Inspect log compression fix on Hawk
pabloRom2004 Sep 18, 2026
6774eda
Document verified upstream recovery fix and independent retries
pabloRom2004 Sep 18, 2026
2304a7e
Accept the verified canonical DeepSeek Flash response alias
pabloRom2004 Sep 18, 2026
3253c98
Keep native CLI checkpoints open across voluntary continuations
pabloRom2004 Sep 18, 2026
7612d69
Fail checkpointed attempts when the sandbox grader connection dies
Sep 18, 2026
131d810
Verify native MCP recovery after the saved tool request
pabloRom2004 Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ venv/

# Inspect logs
logs/
run-artifacts*/

# OS
.DS_Store
Expand Down
398 changes: 263 additions & 135 deletions README.md

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions docs/checkpointing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Durable Hawk recovery

Enable checkpoints explicitly for long runs. Each harness must run the checkpoint-aware ExploitBench wrapper; older task commits cannot be made resumable just by adding configuration.

```yaml
# Merge these settings into the selected Hawk eval-set configuration.
checkpoint:
enabled: true
trigger:
type: time
every: 600
sandbox_paths:
default:
- /rlenv/workspace
- /home/agent
max_consecutive_failures: 3
retry_attempts: 10
retry_immediate: false
```

Also set `fail_on_error: true` in each `exploit_bench` task's arguments. Without it, a task with an errored sample can appear complete to the evaluation-set retry loop. Use one vulnerability per task item and an independent evaluation set per sample when using delayed retries: otherwise retries wait for the other tasks to finish. Pin the task commit, native CLI versions and provider route for reproducible restarts. Worker placement is controlled separately by Kubernetes; this configuration does not enforce one sandbox per node.

The example allows ten attempts, not unlimited retries. Inspect retries the task after increasing delays; successful samples are reused and failed samples restore their last usable checkpoint. A provider 405 is not one of Inspect's normal request-level retry statuses, so the task checkpoint retry supplies recovery. Persistent provider rejection, broken credentials, exhausted quotas and incompatible code still require intervention. A checkpoint failure becomes visible after the configured failure threshold.

A dead image MCP connection also needs an attempt restart. Inspect reports a closed stdout reader or EOF as a tool error, which would otherwise leave the agent spending tokens on a permanently unusable connection. The ExploitBench tool wrapper promotes these specific transport failures to `GraderConnectionError`. Native CLI bridges are cancelled before that error is raised in the agent task, so they cannot swallow it and mark the agent complete. With the checkpoint/retry configuration above, the next attempt creates a fresh grader and restores previous work. Ordinary submission errors and ambiguous tool timeouts remain model feedback. This detects connection death; it does not fix the underlying cause of a repeatedly crashing grader.

Monitor successful authoritative tool responses as well as model calls and checkpoint writes. A running container, a completed model request, or a trace entry saying a tool call exited is insufficient evidence of functional grading. The `mcp_recovery_probe` task kills the real image MCP process after a saved grade and requires successful grading again after restoration; it makes no paid inference calls.

Inspect 0.3.265 fixes a ZIP decompressor compatibility issue exposed by the Hawk Python 3.13.15 runtime. The older version could write a successful final log but fail when rereading it, causing unnecessary retries. Real-image ReAct and native Codex tests on the fixed version each completed after one injected failure and one restored attempt. Check both the durable log and aggregate completion when validating a new runtime. If Hawk's package-age cutoff hides a required upstream fix, an exact official wheel URL with its verified SHA-256 can select that dependency without relaxing the cutoff for all packages.

## What is saved

Hawk writes Inspect state and declared sandbox paths to S3. This preserves conversation, grading history, cumulative token usage and native CLI session files. A restore creates a fresh sandbox from the pinned image, restores the files, and restarts the agent process. It does not restore RAM, background processes, open sockets, or arbitrary changes outside the listed paths. Keep durable work in those paths, or explicitly add the additional paths before launching. Capturing the whole image is much more expensive and has not been validated here.

Time triggers fire at a safe checkpoint boundary. A ten-minute setting is not a guarantee that at most ten minutes of work can be lost: a long model request or tool call can delay the next checkpoint. The final `agent_complete` checkpoint allows scoring to be retried without executing the agent again.

Claude Code and Codex can return voluntarily before the benchmark is complete. Their wrapper owns one checkpoint session across these continuations, rebinds bridge callbacks to the active CLI invocation, and writes completion only after the benchmark finishes. Inspect SWE 0.2.71 and Inspect 0.3.265 were checked: repeatedly opening their native checkpoint scope still registers duplicate bridge keys. A context-local adapter supplies the enclosing checkpoint without changing other samples. The `nudge` fault probe exercises a voluntary exit followed by a provider failure.

The wrapper also recognizes the older premature `agent_complete` checkpoint when continuation was enabled and no benchmark exit reason was recorded. It restores the saved bridge conversation, adds the pending continuation, and resumes the native session. A separate completion marker preserves scorer-only retries after this migration. Normal completed samples must still be preserved by the evaluation-set selection policy.

Checkpoints persist independently of live containers. `runner.cleanup: false` keeps resources for debugging indefinitely until deleted; it does not implement an hours-based retention policy and is unnecessary for durable recovery. Hawk documents persistent checkpoint storage, but the deployment's S3 lifecycle policy determines ultimate retention. Keeping only the `.eval` file is insufficient for restoring sandbox files; retain its associated checkpoint data too.

## Resume and scorer repairs

From an authenticated Hawk session:

```text
hawk eval-set resume EVAL_SET_ID
hawk eval-set resume EVAL_SET_ID --config repaired-config.yaml
```

For a scorer-only repair, publish a compatible task commit, point the repaired config at it, preserve sample IDs/epochs/harness/checkpoint paths, and resume the failed evaluation set. With an `agent_complete` checkpoint, Inspect restores the completed agent state and runs the repaired scorer. This cannot retroactively create a checkpoint for an old run. Arbitrary edits to a solver's tracked state or native CLI version can make a checkpoint incompatible; validate those changes separately.

The automated fault probe uses the real task image and grading tools with a scripted model. It writes random files, injects a provider error or runner crash, then requires a fresh container, identical file hashes, preserved grading/conversation, and unchanged cumulative token usage. Scorer-failure probes require a restart with `EXPLOITBENCH_PROBE_SCORER_FIXED=1` and no repeated model work.

See [Hawk checkpointing](https://hawk.metr.org/user-guide/checkpointing/) and [live observation / ACP](https://hawk.metr.org/user-guide/babysitting-evals/). Observation and intervention are separate: steering a scored benchmark agent changes the measurement and should be restricted to designated tests.

## Avoiding CLI release API rate limits

Explicit Codex `0.154.0` and OpenCode `1.18.31` pins on Linux x64 prefetch the exact official release archive into Inspect SWE's native archive cache. The checked-in SHA-256 digest is verified on both cold and warm reads, and cache replacement is atomic. This avoids GitHub's rate-limited release-metadata API during installation while retaining the complete Codex package and OpenCode's baseline binary. Downloading the archive still requires its release CDN; transport and server errors use Inspect SWE's bounded download retries. Other versions and platforms retain the upstream installer. Verify and add a new digest when changing either pin; this does not silently substitute versions.

The current Inspect SWE release was checked before adding this prefetch: it still resolves these pinned versions through the release API on an empty cache. The integration uses its existing archive-cache mechanism and is covered by real-image tests with release-API resolution deliberately disabled.

The recommended launch profile targets a checkpoint every ten minutes (Hawk's default when checkpointing is enabled); fault tests save every turn to make the injected failures deterministic. Increase the interval to twenty minutes if representative measurements show material checkpoint overhead. Hawk currently exposes no rolling keep-last policy: retain the checkpoint data until a separate, coordinated pruning workflow is validated. Keep multiple recent checkpoints and the final pre-scoring checkpoint when defining that workflow; do not expire individual restic objects while newer snapshots still reference them.
137 changes: 137 additions & 0 deletions docs/grading-flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ where = ["src"]
include = ["exploitbench*"]

[tool.setuptools.package-data]
"*" = ["compose.yaml", "eval.yaml", "run_configs/*.yaml"]
"*" = ["compose.yaml", "k8s.yaml", "eval.yaml", "run_configs/*.yaml"]

[tool.ruff]
src = ["src"]
Expand Down Expand Up @@ -99,24 +99,27 @@ classifiers = [
]
dependencies = [
"anthropic",
"anyio",
"google-genai",
"inspect_ai==0.3.263",
"inspect_swe==0.2.70",
"inspect_ai==0.3.265",
"openai",
"pyyaml>=5.1.0",
"mcp>=1.0.0",
]

[project.optional-dependencies]
cli = [
"inspect-swe @ git+https://github.com/meridianlabs-ai/inspect_swe.git@9a6e92b614fc224b157d7a7bed8df175ea13f7d4",
"nodejs-wheel==24.19.0",
]

[project.urls]
"Source Code" = "https://github.com/Generality-Labs/exploitbench-eval"
"Issue Tracker" = "https://github.com/Generality-Labs/exploitbench-eval/issues"

[project.entry-points.inspect_ai]
exploitbench = "exploitbench"

[project.scripts]
exploitbench-report = "exploitbench.reporting:main"

[dependency-groups]
dev = [
"mypy",
Expand Down
13 changes: 10 additions & 3 deletions src/exploitbench/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from exploitbench.parity_agent import parity_agent
from exploitbench.v8 import v8
from exploitbench.checkpoint_probe import CheckpointProbe, checkpoint_probe
from exploitbench.mcp_recovery_probe import MCPRecoveryProbe, mcp_recovery_probe
from exploitbench.task import exploit_bench

__all__ = ["parity_agent", "v8"]
__all__ = [
"exploit_bench",
"checkpoint_probe",
"CheckpointProbe",
"mcp_recovery_probe",
"MCPRecoveryProbe",
]
Loading