# Caveman Direct vs trim-2 Benchmark Report (`offline`) - **Generated:** `2026-11-30T01:27:03Z` - **Basis:** `inferred` - **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 offline --model claude-sonnet-5-5 --trials 1` ## Direct vs Caveman Summary | Arm | Invariant & Retention Gate | Wire `o200k_base` Tokens (`inferred`) | Reduction vs Direct | 95% Bootstrap CI | Cache Busts | Cross-Session Poison | p50 / p95 (ms) | |---|---:|---:|---:|---:|---:|---:|---:| | `direct` (Direct (no compression)) | **32/32 (100.0%)** | 307,140 | baseline | n/a | 0 | 0 | 6 / 15 | | `caveman` (Caveman (trim-2 smart_max)) | **32/32 (100.0%)** | 43,972 | **85.7%** | 79.6% to 90.6% | 0 | 0 | 51 / 181 | ## Domain & Category Rollup | Category | Gate Pass | `direct` Wire Tokens | `caveman` Wire Tokens | Wire Cut | |---|---:|---:|---:|---:| | `code_comprehension` | 4/4 | 50,651 | 18,132 | **64.2%** | | `executable_edit` | 2/2 | 14,980 | 1,398 | **90.7%** | | `diff_review` | 1/1 | 5,601 | 383 | **93.2%** | | `ops_logs` | 2/2 | 22,060 | 1,029 | **95.3%** | | `structured` | 2/2 | 16,007 | 3,292 | **79.4%** | | `proxy_cache_safety` | 2/2 | 26,345 | 2,335 | **91.1%** | | `fail_closed_control` | 1/1 | 2,074 | 2,074 | **0.0%** | | `adversarial` | 1/1 | 7,205 | 375 | **94.8%** | | `codemode_mcp` | 1/1 | 9,640 | 197 | **98.0%** | | `ui_frontend` | 2/2 | 21,595 | 2,165 | **90.0%** | | `long_horizon` | 4/4 | 38,556 | 4,203 | **89.1%** | | `sql_data` | 1/1 | 4,732 | 442 | **90.7%** | | `infra_devops` | 2/2 | 14,051 | 2,158 | **84.6%** | | `docs_search` | 1/1 | 11,159 | 875 | **92.2%** | | `systems_swe` | 1/1 | 3,601 | 542 | **84.9%** | | `legal_compliance` | 1/1 | 4,629 | 776 | **83.2%** | | `finance_analytics` | 1/1 | 14,933 | 1,216 | **91.9%** | | `secops_incident` | 1/1 | 24,989 | 720 | **97.1%** | | `product_support` | 1/1 | 6,278 | 679 | **89.2%** | | `data_science` | 1/1 | 8,054 | 981 | **87.8%** | ## Per-Task Breakdown (All Rows Included — Losing & Fail-Closed Visible) | Task | Category | `direct` | `caveman` | Wire Cut vs Direct | |---|---|---:|---:|---:| | `code_json_anomaly_mad` | `code_comprehension` | PASS · 10,325t | PASS · 5,848t | **43.4%** | | `code_epoch_economics` | `code_comprehension` | PASS · 8,924t | PASS · 3,971t | **55.5%** | | `code_store_headline_refusal` | `code_comprehension` | PASS · 21,802t | PASS · 7,700t | **64.7%** | | `code_vocab_gap_deadlock` | `code_comprehension` | PASS · 9,600t | PASS · 613t | **93.6%** | | `edit_go_paginate_patch` | `executable_edit` | PASS · 9,626t | PASS · 784t | **91.9%** | | `edit_py_refund_patch` | `executable_edit` | PASS · 5,354t | PASS · 614t | **88.5%** | | `diff_webhook_security_review` | `diff_review` | PASS · 5,601t | PASS · 383t | **93.2%** | | `log_logfmt_ndjson_incident` | `ops_logs` | PASS · 19,461t | PASS · 427t | **97.8%** | | `test_pytest_and_traceback` | `ops_logs` | PASS · 2,599t | PASS · 602t | **76.8%** | | `structured_json_and_html` | `structured` | PASS · 9,022t | PASS · 2,173t | **75.9%** | | `structured_csv_and_yaml` | `structured` | PASS · 6,985t | PASS · 1,119t | **84.0%** | | `multiturn_cache_and_cross_session` | `proxy_cache_safety` | PASS · 17,878t | PASS · 1,720t | **90.4%** | | `parallel_tools_with_system_reminder` | `proxy_cache_safety` | PASS · 8,467t | PASS · 615t | **92.7%** | | `failclosed_exhaustive_review` | `fail_closed_control` | PASS · 2,074t | PASS · 2,074t | **0.0%** | | `adversarial_keyword_stuffing` | `adversarial` | PASS · 7,205t | PASS · 375t | **94.8%** | | `codemode_oversized_log` | `codemode_mcp` | PASS · 9,640t | PASS · 197t | **98.0%** | | `ui_react_tsx_design_polish` | `ui_frontend` | PASS · 13,227t | PASS · 1,040t | **92.1%** | | `ui_css_tokens_and_html_a11y` | `ui_frontend` | PASS · 8,368t | PASS · 1,125t | **86.6%** | | `long_horizon_multifile_go_bugfix` | `long_horizon` | PASS · 8,641t | PASS · 1,175t | **86.4%** | | `long_horizon_multi_session_ts_refactor` | `long_horizon` | PASS · 5,729t | PASS · 966t | **83.1%** | | `sql_migration_rls_security_audit` | `sql_data` | PASS · 4,732t | PASS · 442t | **90.7%** | | `k8s_infra_probe_debug` | `infra_devops` | PASS · 6,521t | PASS · 1,055t | **83.8%** | | `monorepo_rfc_and_grep_synthesis` | `docs_search` | PASS · 11,159t | PASS · 875t | **92.2%** | | `long_context_ci_build_and_fix` | `long_horizon` | PASS · 19,073t | PASS · 779t | **95.9%** | | `swe_rust_concurrency_fix` | `systems_swe` | PASS · 3,601t | PASS · 542t | **84.9%** | | `swe_openapi_and_terraform_drift` | `infra_devops` | PASS · 7,530t | PASS · 1,103t | **85.4%** | | `swe_long_horizon_py_pricing_pkg` | `long_horizon` | PASS · 5,113t | PASS · 1,283t | **74.9%** | | `work_legal_contract_msa_redline` | `legal_compliance` | PASS · 4,629t | PASS · 776t | **83.2%** | | `work_finance_gl_and_board_memo` | `finance_analytics` | PASS · 14,933t | PASS · 1,216t | **91.9%** | | `work_secops_cloudtrail_postmortem` | `secops_incident` | PASS · 24,989t | PASS · 720t | **97.1%** | | `work_product_support_ticket_triage` | `product_support` | PASS · 6,278t | PASS · 679t | **89.2%** | | `work_data_science_ab_stats_fix` | `data_science` | PASS · 8,054t | PASS · 981t | **87.8%** | ## Failures & Diagnostic Notes No task failures recorded across arms. ## Claim Boundaries - Controlled benchmark evidence (`inferred`), 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.