How the evaluation harness works
mainThe harness compares two Claude Agent SDK variants using the SWE-bench Lite dataset:
- Agent1 (ops-only): Uses only basic file operations:
Read,Grep, andGlob. - Agent2 (ops+search): Uses the same tools as Agent1 plus semantic search capabilities via
code-chunkembeddings.
Execution Lifecycle:
- Loads the SWE-bench Lite dataset.
- For each instance, creates a git worktree at the target commit.
- Executes Agent1.
- Builds a semantic index using
code-chunk. - Executes Agent2 using the
semantic_searchtool. - Computes retrieval metrics against the oracle files from the patch.
- Aggregates and outputs results.
Embedding Caching:
To avoid redundant computation, semantic search indexes are cached at ~/.cache/swebench-eval/embeddings/. The cache key is derived from the instance ID, embedding provider, and dimensions.