# Caveman Direct vs trim-2 Benchmark Report (`claude`) - **Generated:** `2026-11-30T01:06:49Z` - **Basis:** `benchmark_counterfactual` - **Model:** `claude-sonnet-5-5` · **Trials:** `1` · **Tasks:** `32` (fail-closed controls included in aggregate) - **Build ref:** `HEAD` (`e3c0b656`) - **Corpus SHA-256:** `d72c1da270d2e6e3b3305faa4152370926230824ee6b7831e9d005f15c963449` - **Exact command:** `go run ./benchmarks/trim2-bench --mode claude --model claude-sonnet-5-5 --trials 1` ## Direct vs Caveman Summary | Arm | Exact Quality | Input Tokens (incl. cache + recovery) | Token Cut | 95% Bootstrap CI | Total Cost (USD) | Cost Saved | Recovery Calls | Cache Busts | |---|---:|---:|---:|---:|---:|---:|---:|---:| | `direct` (Direct (no compression)) | **32/32 (100.0%)** | 2,447,108 | baseline | n/a | $1.6615 | baseline | 0 | 0 | | `caveman` (Caveman (trim-2 smart_max)) | **32/32 (100.0%)** | 2,047,020 | **16.3%** | 5.1% to 26.6% | $0.9482 | **42.9%** | 3 | 0 | _Provider token breakdown:_ `direct` = 44,884 raw input + 497,432 cache write + 1,904,792 cache read + 13,767 output; `caveman` = 44,892 raw input + **212,966 cache write (57.2% cut)** + 1,789,162 cache read + 14,710 output. ## Domain & Category Rollup | Category | Pass | `direct` Tokens | `caveman` Tokens | Token Cut | `direct` Cost | `caveman` Cost | Cost Saved | Recoveries | |---|---:|---:|---:|---:|---:|---:|---:|---:| | `code_comprehension` | 4/4 | 267,969 | 195,966 | **26.9%** | $0.2110 | $0.1365 | **35.3%** | 0 | | `executable_edit` | 2/2 | 152,852 | 129,034 | **15.6%** | $0.0770 | $0.0458 | **40.6%** | 0 | | `diff_review` | 1/1 | 49,682 | 49,682 | **0.0%** | $0.0360 | $0.0359 | **0.2%** | 0 | | `ops_logs` | 2/2 | 115,320 | 87,935 | **23.7%** | $0.1107 | $0.0425 | **61.6%** | 0 | | `structured` | 2/2 | 101,466 | 89,921 | **11.4%** | $0.0775 | $0.0494 | **36.2%** | 0 | | `proxy_cache_safety` | 2/2 | 143,769 | 129,649 | **9.8%** | $0.0876 | $0.0523 | **40.3%** | 0 | | `fail_closed_control` | 1/1 | 43,993 | 43,998 | **0.0%** | $0.0205 | $0.0210 | **-2.5%** | 0 | | `adversarial` | 1/1 | 53,001 | 43,098 | **18.7%** | $0.0439 | $0.0202 | **54.0%** | 0 | | `codemode_mcp` | 1/1 | 56,122 | 42,739 | **23.8%** | $0.0512 | $0.0182 | **64.5%** | 0 | | `ui_frontend` | 2/2 | 188,948 | 154,368 | **18.3%** | $0.1069 | $0.0626 | **41.4%** | 0 | | `long_horizon` | 4/4 | 473,944 | 407,999 | **13.9%** | $0.2668 | $0.1783 | **33.2%** | 0 | | `sql_data` | 1/1 | 99,774 | 64,742 | **35.1%** | $0.0461 | $0.0243 | **47.3%** | 0 | | `infra_devops` | 2/2 | 158,356 | 132,701 | **16.2%** | $0.0873 | $0.0555 | **36.4%** | 0 | | `docs_search` | 1/1 | 62,317 | 43,980 | **29.4%** | $0.0678 | $0.0235 | **65.4%** | 0 | | `systems_swe` | 1/1 | 91,497 | 64,561 | **29.4%** | $0.0339 | $0.0228 | **32.7%** | 0 | | `legal_compliance` | 1/1 | 51,504 | 92,731 | **-80.0%** | $0.0406 | $0.0373 | **8.3%** | 1 | | `finance_analytics` | 1/1 | 64,664 | 119,715 | **-85.1%** | $0.0734 | $0.0494 | **32.8%** | 2 | | `secops_incident` | 1/1 | 134,634 | 44,109 | **67.2%** | $0.1272 | $0.0236 | **81.5%** | 0 | | `product_support` | 1/1 | 54,115 | 43,817 | **19.0%** | $0.0472 | $0.0221 | **53.1%** | 0 | | `data_science` | 1/1 | 83,181 | 66,275 | **20.3%** | $0.0490 | $0.0270 | **44.9%** | 0 | ## Per-Task Breakdown (All Rows Included — Losing & Fail-Closed Visible) | Task | Category | `direct` | `caveman` | Token Cut | Cost Saved | |---|---|---:|---:|---:|---:| | `code_json_anomaly_mad` | `code_comprehension` | PASS · 52,203t · $0.0436 | PASS · 49,160t · $0.0361 | **5.8%** | **17.2%** | | `code_epoch_economics` | `code_comprehension` | PASS · 51,414t · $0.0391 | PASS · 47,565t · $0.0294 | **7.5%** | **24.8%** | | `code_store_headline_refusal` | `code_comprehension` | PASS · 113,459t · $0.0896 | PASS · 55,986t · $0.0513 | **50.7%** | **42.8%** | | `code_vocab_gap_deadlock` | `code_comprehension` | PASS · 50,893t · $0.0387 | PASS · 43,255t · $0.0198 | **15.0%** | **48.9%** | | `edit_go_paginate_patch` | `executable_edit` | PASS · 79,790t · $0.0429 | PASS · 64,558t · $0.0228 | **19.1%** | **46.8%** | | `edit_py_refund_patch` | `executable_edit` | PASS · 73,062t · $0.0341 | PASS · 64,476t · $0.0229 | **11.8%** | **32.8%** | | `diff_webhook_security_review` | `diff_review` | PASS · 49,682t · $0.0360 | PASS · 49,682t · $0.0359 | **0.0%** | **0.2%** | | `log_logfmt_ndjson_incident` | `ops_logs` | PASS · 68,621t · $0.0828 | PASS · 43,177t · $0.0191 | **37.1%** | **76.9%** | | `test_pytest_and_traceback` | `ops_logs` | PASS · 46,699t · $0.0279 | PASS · 44,758t · $0.0234 | **4.2%** | **16.3%** | | `structured_json_and_html` | `structured` | PASS · 49,068t · $0.0348 | PASS · 45,615t · $0.0262 | **7.0%** | **24.7%** | | `structured_csv_and_yaml` | `structured` | PASS · 52,398t · $0.0427 | PASS · 44,306t · $0.0232 | **15.4%** | **45.6%** | | `multiturn_cache_and_cross_session` | `proxy_cache_safety` | PASS · 95,122t · $0.0545 | PASS · 86,328t · $0.0325 | **9.2%** | **40.4%** | | `parallel_tools_with_system_reminder` | `proxy_cache_safety` | PASS · 48,647t · $0.0332 | PASS · 43,321t · $0.0199 | **10.9%** | **40.1%** | | `failclosed_exhaustive_review` | `fail_closed_control` | PASS · 43,993t · $0.0205 | PASS · 43,998t · $0.0210 | **0.0%** | **-2.5%** | | `adversarial_keyword_stuffing` | `adversarial` | PASS · 53,001t · $0.0439 | PASS · 43,098t · $0.0202 | **18.7%** | **54.0%** | | `codemode_oversized_log` | `codemode_mcp` | PASS · 56,122t · $0.0512 | PASS · 42,739t · $0.0182 | **23.8%** | **64.5%** | | `ui_react_tsx_design_polish` | `ui_frontend` | PASS · 110,077t · $0.0626 | PASS · 87,891t · $0.0345 | **20.2%** | **44.9%** | | `ui_css_tokens_and_html_a11y` | `ui_frontend` | PASS · 78,871t · $0.0442 | PASS · 66,477t · $0.0281 | **15.7%** | **36.4%** | | `long_horizon_multifile_go_bugfix` | `long_horizon` | PASS · 111,077t · $0.0552 | PASS · 110,662t · $0.0551 | **0.4%** | **0.2%** | | `long_horizon_multi_session_ts_refactor` | `long_horizon` | PASS · 118,217t · $0.0587 | PASS · 111,224t · $0.0470 | **5.9%** | **19.9%** | | `sql_migration_rls_security_audit` | `sql_data` | PASS · 99,774t · $0.0461 | PASS · 64,742t · $0.0243 | **35.1%** | **47.3%** | | `k8s_infra_probe_debug` | `infra_devops` | PASS · 78,954t · $0.0434 | PASS · 66,432t · $0.0274 | **15.9%** | **36.7%** | | `monorepo_rfc_and_grep_synthesis` | `docs_search` | PASS · 62,317t · $0.0678 | PASS · 43,980t · $0.0235 | **29.4%** | **65.4%** | | `long_context_ci_build_and_fix` | `long_horizon` | PASS · 169,940t · $0.1083 | PASS · 91,890t · $0.0356 | **45.9%** | **67.1%** | | `swe_rust_concurrency_fix` | `systems_swe` | PASS · 91,497t · $0.0339 | PASS · 64,561t · $0.0228 | **29.4%** | **32.7%** | | `swe_openapi_and_terraform_drift` | `infra_devops` | PASS · 79,402t · $0.0439 | PASS · 66,269t · $0.0281 | **16.5%** | **36.1%** | | `swe_long_horizon_py_pricing_pkg` | `long_horizon` | PASS · 74,710t · $0.0445 | PASS · 94,223t · $0.0406 | **-26.1%** | **8.8%** | | `work_legal_contract_msa_redline` | `legal_compliance` | PASS · 51,504t · $0.0406 | PASS · 92,731t · $0.0373 (1 rec) | **-80.0%** | **8.3%** | | `work_finance_gl_and_board_memo` | `finance_analytics` | PASS · 64,664t · $0.0734 | PASS · 119,715t · $0.0494 (2 rec) | **-85.1%** | **32.8%** | | `work_secops_cloudtrail_postmortem` | `secops_incident` | PASS · 134,634t · $0.1272 | PASS · 44,109t · $0.0236 | **67.2%** | **81.5%** | | `work_product_support_ticket_triage` | `product_support` | PASS · 54,115t · $0.0472 | PASS · 43,817t · $0.0221 | **19.0%** | **53.1%** | | `work_data_science_ab_stats_fix` | `data_science` | PASS · 83,181t · $0.0490 | PASS · 66,275t · $0.0270 | **20.3%** | **44.9%** | ## Failures & Diagnostic Notes No task failures recorded across arms. ## Claim Boundaries - Controlled benchmark evidence (`benchmark_counterfactual`), not production traffic or customer billing. - Fail-closed controls (`failclosed_exhaustive_review`) and no-op/negative rows remain in the aggregate. - In live/claude mode, every `caveman_retrieve` recovery tool call and follow-up turn is counted in full against the arm's provider-reported token usage and USD cost.