Datasets:
filter to CC >=2.1.139 (header-keyed grouping); +2 traces (98 total)
Browse files- README.md +39 -81
- plots/distributions_linear.png +2 -2
- plots/distributions_log.png +2 -2
- traces.jsonl +2 -2
README.md
CHANGED
|
@@ -22,94 +22,54 @@ configs:
|
|
| 22 |
|
| 23 |
# CC Traces — Weka, No-Subagents, v5 only (May 18 2026)
|
| 24 |
|
| 25 |
-
A collection of **
|
| 26 |
model requests) drawn from real production traffic against the Claude
|
| 27 |
Code CLI ≥ 2.1.139. Each trace captures the full request/response
|
| 28 |
sequence of a single agent session, including per-request KV block
|
| 29 |
hashes, so the dataset can be replayed against an inference engine or
|
| 30 |
used to simulate prefix-cache behavior offline.
|
| 31 |
|
| 32 |
-
**No-subagents, v5-only variant.**
|
| 33 |
-
source weka traces with two filters applied:
|
| 34 |
|
| 35 |
1. **No subagents.** All `WekaSubagentEntry` blocks have been stripped —
|
| 36 |
only top-level main-agent turns remain.
|
| 37 |
2. **v5 only.** Every replayable request in every included session has
|
| 38 |
-
`trace_version = 5` (
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
- **Traces:**
|
| 53 |
-
- **Requests:**
|
| 54 |
- **Models:** `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`
|
| 55 |
- **KV block size:** 64 tokens
|
| 56 |
-
- **Hash scope:** `local`
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
numbers below are larger than what the Anthropic API would have
|
| 66 |
-
billed for the same prompt — but they're self-consistent between
|
| 67 |
-
`in` and `hash_ids`, which is what matters for KV-cache replay
|
| 68 |
-
simulation.
|
| 69 |
-
|
| 70 |
-
If you replay these traces against a real Claude (or Claude-like)
|
| 71 |
-
server, the server will re-tokenize the text and see ~Claude-equivalent
|
| 72 |
-
token counts, so cache-hit-rate measurements remain accurate.
|
| 73 |
-
|
| 74 |
-
## What's in each trace
|
| 75 |
-
|
| 76 |
-
Top-level trace fields:
|
| 77 |
-
|
| 78 |
-
| field | type | description |
|
| 79 |
-
|-----------------|------------------|-----------------------------------------------------|
|
| 80 |
-
| `id` | str | Trace identifier (the proxy session id) |
|
| 81 |
-
| `models` | list[str] | Models used by the trace |
|
| 82 |
-
| `block_size` | int | KV block size used to derive `hash_ids` (64) |
|
| 83 |
-
| `hash_id_scope` | str | `local` — hash IDs are per-trace, not global |
|
| 84 |
-
| `requests` | list[object] | Ordered list of per-request records (main-agent only) |
|
| 85 |
-
|
| 86 |
-
Each entry in `requests` is:
|
| 87 |
-
|
| 88 |
-
| field | type | description |
|
| 89 |
-
|---------------|-----------|--------------------------------------------------------------------------|
|
| 90 |
-
| `t` | float | Seconds since start of trace |
|
| 91 |
-
| `type` | str | `n` (non-streaming) or `s` (streaming) |
|
| 92 |
-
| `model` | str | Target model for this request |
|
| 93 |
-
| `in` | int | Effective prompt tokens covered by `hash_ids` (proxy tokenizer) |
|
| 94 |
-
| `out` | int | Output tokens (Anthropic-reported) |
|
| 95 |
-
| `hash_ids` | list[int] | Per-trace local block-hash IDs for the input, one per 64-token block |
|
| 96 |
-
| `api_time` | float | End-to-end server time for this call (seconds) |
|
| 97 |
-
| `think_time` | float | Wall-clock gap from previous request's end (seconds) |
|
| 98 |
-
| `ttft` | float? | Time to first token (streaming requests only) |
|
| 99 |
-
|
| 100 |
-
`hash_ids` make the dataset unusually useful for KV-cache work: the
|
| 101 |
-
contiguous common prefix between turn *t* and turn *t − 1* exactly
|
| 102 |
-
measures the portion of the input that a local prefix cache would be
|
| 103 |
-
able to reuse.
|
| 104 |
|
| 105 |
## Summary statistics
|
| 106 |
|
| 107 |
| | p50 | p75 | p90 | p95 | p99 | mean |
|
| 108 |
|------------------------------|---------:|---------:|---------:|---------:|---------:|---------:|
|
| 109 |
-
| ISL (tokens) |
|
| 110 |
-
| OSL (tokens) |
|
| 111 |
-
| `think_time` (s) |
|
| 112 |
-
| Turn depth (requests/trace) |
|
| 113 |
|
| 114 |

|
| 115 |

|
|
@@ -118,20 +78,18 @@ able to reuse.
|
|
| 118 |
|
| 119 |
| model | requests |
|
| 120 |
|-------|---------:|
|
| 121 |
-
| `claude-opus-4-7` |
|
| 122 |
| `claude-opus-4-6` | 302 |
|
| 123 |
-
| `claude-sonnet-4-6` |
|
| 124 |
|
| 125 |
## Source
|
| 126 |
|
| 127 |
Derived from the SemiAnalysis Claude Code traffic proxy. Build pipeline:
|
| 128 |
|
| 129 |
-
1. `utils/sample_proxy_traces.py --min-trace-version 5 --min-main-turns 20 --privacy-mode anon`
|
| 130 |
-
pulls v5-only Anthropic sessions out of the proxy DB.
|
| 131 |
2. `utils/proxy_to_weka.py` converts per-session JSONL into weka-format
|
| 132 |
-
trace JSON
|
| 133 |
-
|
| 134 |
-
3.
|
| 135 |
-
|
| 136 |
-
4.
|
| 137 |
-
(one trace per line).
|
|
|
|
| 22 |
|
| 23 |
# CC Traces — Weka, No-Subagents, v5 only (May 18 2026)
|
| 24 |
|
| 25 |
+
A collection of **98 multi-turn agentic traces** (≈ 22.8 k individual
|
| 26 |
model requests) drawn from real production traffic against the Claude
|
| 27 |
Code CLI ≥ 2.1.139. Each trace captures the full request/response
|
| 28 |
sequence of a single agent session, including per-request KV block
|
| 29 |
hashes, so the dataset can be replayed against an inference engine or
|
| 30 |
used to simulate prefix-cache behavior offline.
|
| 31 |
|
| 32 |
+
**No-subagents, v5-only, CC ≥ 2.1.139 variant.** Three filters:
|
|
|
|
| 33 |
|
| 34 |
1. **No subagents.** All `WekaSubagentEntry` blocks have been stripped —
|
| 35 |
only top-level main-agent turns remain.
|
| 36 |
2. **v5 only.** Every replayable request in every included session has
|
| 37 |
+
`trace_version = 5` (latest proxy schema, o200k_base tokenizer).
|
| 38 |
+
3. **Claude Code CLI ≥ 2.1.139.** Every successful request in every
|
| 39 |
+
included session is on a CC build that ships the
|
| 40 |
+
`x-claude-code-agent-id` HTTP header — the canonical signal sub-agent
|
| 41 |
+
grouping depends on. Sessions where any row predates this header
|
| 42 |
+
are excluded entirely because we can't reliably distinguish a
|
| 43 |
+
Task-tool sub-agent from a utility call without it.
|
| 44 |
+
|
| 45 |
+
Each remaining trace has **≥ 20 main-agent turns** post-strip so every
|
| 46 |
+
trace exercises multi-turn replay meaningfully.
|
| 47 |
+
|
| 48 |
+
Companion: [`cc-traces-weka-051826`](https://huggingface.co/datasets/semianalysisai/cc-traces-weka-051826)
|
| 49 |
+
is the same 98 traces with sub-agent fan-out preserved.
|
| 50 |
+
|
| 51 |
+
- **Traces:** 98
|
| 52 |
+
- **Requests:** 22,822 total, mean **232.9** per trace, max **2,171**
|
| 53 |
- **Models:** `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`
|
| 54 |
- **KV block size:** 64 tokens
|
| 55 |
+
- **Hash scope:** `local`
|
| 56 |
+
|
| 57 |
+
## Tokenizer caveat
|
| 58 |
+
|
| 59 |
+
The `in` field and `hash_ids` are measured in the proxy's tokenizer
|
| 60 |
+
(`o200k_base`, GPT-4o family). Anthropic typically reports ~60 % of the
|
| 61 |
+
o200k token count for the same content — so ISL numbers below are
|
| 62 |
+
larger than what Anthropic would bill for the same prompt, but
|
| 63 |
+
self-consistent between `in` and `hash_ids` for cache-hit simulation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Summary statistics
|
| 66 |
|
| 67 |
| | p50 | p75 | p90 | p95 | p99 | mean |
|
| 68 |
|------------------------------|---------:|---------:|---------:|---------:|---------:|---------:|
|
| 69 |
+
| ISL (tokens) | 181,474 | 338,879 | 525,701 | 664,749 | 838,501 | 240,502 |
|
| 70 |
+
| OSL (tokens) | 212 | 569 | 1,455 | 2,499 | 6,528 | 623 |
|
| 71 |
+
| `think_time` (s) | 0.98 | 2.71 | 12.45 | 71.64 | 448.24 | 92.32 |
|
| 72 |
+
| Turn depth (requests/trace) | 110 | 300 | 568 | 730 | 1,119 | 233 |
|
| 73 |
|
| 74 |

|
| 75 |

|
|
|
|
| 78 |
|
| 79 |
| model | requests |
|
| 80 |
|-------|---------:|
|
| 81 |
+
| `claude-opus-4-7` | 22,484 |
|
| 82 |
| `claude-opus-4-6` | 302 |
|
| 83 |
+
| `claude-sonnet-4-6` | 36 |
|
| 84 |
|
| 85 |
## Source
|
| 86 |
|
| 87 |
Derived from the SemiAnalysis Claude Code traffic proxy. Build pipeline:
|
| 88 |
|
| 89 |
+
1. `utils/sample_proxy_traces.py --min-trace-version 5 --min-main-turns 20 --require-cli-min 2.1.139 --privacy-mode anon`
|
|
|
|
| 90 |
2. `utils/proxy_to_weka.py` converts per-session JSONL into weka-format
|
| 91 |
+
trace JSON. Sub-agent grouping is identical to the
|
| 92 |
+
[proxy dashboard's `buildRequestRuns`](https://github.com/SemiAnalysisAI/semianalysis-claude-code-proxy/blob/main/packages/app/src/lib/subagent-runs.ts).
|
| 93 |
+
3. Post-step strips all `WekaSubagentEntry` blocks; traces with <20
|
| 94 |
+
surviving main turns are dropped (none dropped at this build).
|
| 95 |
+
4. Remaining traces concatenated into `traces.jsonl` (one trace per line).
|
|
|
plots/distributions_linear.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
plots/distributions_log.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
traces.jsonl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2a7698312e97f52e5eaa01d9ebd7dafcd17fc8e7d1fa55c9a3aa30749a440ec
|
| 3 |
+
size 538929960
|