camsemianalsyis commited on
Commit
dad9f32
·
verified ·
1 Parent(s): 3a786bc

Initial upload: 175 traces with subagents, v5-only + ≥20 main turns + CC ≥ 2.1.139

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ traces.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pretty_name: CC Traces — Weka, With Subagents, v5 only (May 19 2026)
4
+ task_categories:
5
+ - text-generation
6
+ tags:
7
+ - llm
8
+ - inference
9
+ - benchmarking
10
+ - kv-cache
11
+ - agentic
12
+ - multi-turn
13
+ - claude
14
+ - subagents
15
+ size_categories:
16
+ - n<1K
17
+ configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: traces.jsonl
22
+ ---
23
+
24
+ # CC Traces — Weka, With Subagents, v5 only (May 19 2026)
25
+
26
+ A collection of **175 multi-turn agentic traces** drawn from real production
27
+ traffic against the Claude Code CLI ≥ 2.1.139. Each trace captures the full
28
+ request/response sequence of a single agent session, including per-request
29
+ KV block hashes AND the original sub-agent fan-out structure (Task-tool
30
+ spawned sub-agents grouped into `WekaSubagentEntry` blocks).
31
+
32
+ Use this dataset when you want to:
33
+ - Simulate the full agentic-coding workload including parallel Task-tool
34
+ sub-agent fan-out
35
+ - Study sub-agent dispatch patterns, instance counts, durations
36
+ - Replay against an inference engine that should see the same concurrent-
37
+ request structure a real Claude Code session generates
38
+
39
+ Filters:
40
+
41
+ 1. **v5 only.** Every replayable request in every included session has
42
+ `trace_version = 5` (the latest proxy schema, o200k_base tokenizer).
43
+ Sessions containing any earlier-format request are excluded entirely.
44
+ 2. **≥ 20 main-agent turns.** Per-trace main-agent stream (the would-be
45
+ no-subagents stream) must have at least 20 turns. Sub-agent fan-out
46
+ is on top of that.
47
+ 3. **CC ≥ 2.1.139.** Every replayable request in every included session
48
+ originated from a Claude Code CLI build at version 2.1.139 or newer.
49
+
50
+ - **Traces:** 175
51
+ - **Top-level entries:** 39,370 (38,368 main turns + 1,002 subagent groups)
52
+ - **Sub-agent inner requests:** 35,458
53
+ - **Total individual model requests:** 73,826
54
+ - **Models:** `claude-opus-4-7` (70,643 req), `claude-opus-4-6` (2,138 req), `claude-haiku-4-5-20251001` (949 req), `claude-sonnet-4-6` (96 req)
55
+ - **KV block size:** 64 tokens
56
+ - **Hash scope:** `local` — block hash IDs are only comparable *within*
57
+ a single trace; they are not a global content-addressable identity.
58
+
59
+ ## Important: tokenizer caveat
60
+
61
+ The `in` field on each request and the `hash_ids` array are both
62
+ measured in **the proxy's tokenizer** (`o200k_base`, GPT-4o family).
63
+ Anthropic typically reports ~60 % of the o200k token count for the same
64
+ content. So the ISL numbers below are larger than what the Anthropic
65
+ API would have billed for the same prompt — but they're self-consistent
66
+ between `in` and `hash_ids`, which is what matters for KV-cache replay
67
+ simulation.
68
+
69
+ ## What's in each trace
70
+
71
+ Top-level trace fields:
72
+
73
+ | field | type | description |
74
+ |-----------------|------------------|-----------------------------------------------------|
75
+ | `id` | str | Trace identifier (the proxy session id) |
76
+ | `models` | list[str] | Models used by the trace |
77
+ | `block_size` | int | KV block size used to derive `hash_ids` (64) |
78
+ | `hash_id_scope` | str | `local` — hash IDs are per-trace, not global |
79
+ | `requests` | list[object] | Ordered list of per-request records OR `WekaSubagentEntry` groups |
80
+
81
+ Each entry in `requests` is one of two shapes:
82
+
83
+ ### Main-agent request (`type: "n"` or `"s"`)
84
+
85
+ | field | type | description |
86
+ |---------------|-----------|--------------------------------------------------------------------------|
87
+ | `t` | float | Seconds since start of trace |
88
+ | `type` | str | `n` (non-streaming) or `s` (streaming) |
89
+ | `model` | str | Target model for this request |
90
+ | `in` | int | Effective prompt tokens covered by `hash_ids` (proxy tokenizer) |
91
+ | `out` | int | Output tokens (Anthropic-reported) |
92
+ | `hash_ids` | list[int] | Per-trace local block-hash IDs for the input, one per 64-token block |
93
+ | `api_time` | float | End-to-end server time for this call (seconds) |
94
+ | `think_time` | float? | Wall-clock gap from previous request's end (seconds) |
95
+ | `ttft` | float? | Time to first token (streaming requests only) |
96
+
97
+ ### Sub-agent group (`type: "subagent"`)
98
+
99
+ | field | type | description |
100
+ |-----------------|----------------|--------------------------------------------------------|
101
+ | `t` | float | Start time (seconds since trace start) |
102
+ | `type` | str | Always `"subagent"` |
103
+ | `agent_id` | str | Stable per-trace sub-agent instance id (slug + suffix) |
104
+ | `subagent_type` | str | Sub-agent label (`"Subagent"` for Claude Code ≥ 2.1.139, else the original proxy label) |
105
+ | `duration_ms` | int | Wall-clock span first→last inner request |
106
+ | `total_tokens` | int | Sum of `in + out` across inner requests |
107
+ | `tool_use_count`| null | Not tracked in the proxy DB |
108
+ | `status` | str | Always `"completed"` |
109
+ | `requests` | list[object] | Inner main-shape entries (type `n` — sub-agents are non-streaming) |
110
+ | `models` | list[str] | Distinct models used inside this sub-agent run |
111
+
112
+ Sub-agent groups are emitted at the position of the first inner request
113
+ in the chronological stream. Their inner requests have absolute `t`
114
+ values (not relative to the group start), making sub-agent and main-
115
+ agent timelines directly interleavable for replay.
116
+
117
+ `hash_ids` make the dataset unusually useful for KV-cache work: the
118
+ contiguous common prefix between turn *t* and turn *t − 1* exactly
119
+ measures the portion of the input that a local prefix cache would be
120
+ able to reuse. The same accounting applies to sub-agent inner requests
121
+ within their group, and to the dispatching parent request that
122
+ triggered them.
123
+
124
+ ## Summary statistics
125
+
126
+ Across **all** requests (main + sub-agent inner = 37,766 requests):
127
+
128
+ | | p50 | p75 | p90 | p95 | p99 | mean |
129
+ |------------------------------|---------:|---------:|---------:|---------:|---------:|---------:|
130
+ | ISL (tokens) | 100,902 | 229,982 | 443,856 | 580,438 | 803,019 | 172,848 |
131
+ | OSL (tokens) | 224 | 478 | 1,150 | 1,907 | 5,461 | 530 |
132
+ | Top entries/trace | 115 | — | — | 678 | 1,141 | 231 |
133
+
134
+ ## Plots
135
+
136
+ ### Main-agent stream
137
+
138
+ Histograms across all 21,566 main-agent turns (sub-agent groups skipped).
139
+ Same view as the [no-subagents sibling](https://huggingface.co/datasets/semianalysisai/cc-traces-weka-no-subagents-051826) — the two datasets share an identical main-agent stream.
140
+
141
+ ![Main-stream distributions — log x](plots/distributions_log.png)
142
+ ![Main-stream distributions — linear x](plots/distributions_linear.png)
143
+
144
+ ### Sub-agent fan-out analysis
145
+
146
+ Histograms across all 618 sub-agent groups (and their 16,200 inner requests). Companion to the main-stream plots — answers questions about how often sub-agents are spawned, how deep their tool-loops go, how long they take, and how much intra-group prefix cache reuse exists.
147
+
148
+ ![Sub-agent distributions — log x](plots/subagent_distributions_log.png)
149
+ ![Sub-agent distributions — linear x](plots/subagent_distributions_linear.png)
150
+
151
+ Six panels:
152
+
153
+ 1. **Sub-agent groups per trace** — distribution of how many distinct sub-agent invocations each session spawns
154
+ 2. **Inner requests per group** — depth of each sub-agent's tool-use loop
155
+ 3. **Group wall-clock duration** — first→last inner span (seconds)
156
+ 4. **Group total tokens** — `Σ(in + out)` across each group's inner requests
157
+ 5. **Inner-request ISL** — per-call input length INSIDE sub-agent loops (smaller than main-agent turns because sub-agents work on focused sub-problems with trimmed context)
158
+ 6. **Intra-group cache hit rate** — for each non-first inner request, fraction of `hash_ids` already seen in earlier inners of the SAME group. Captures how much KV-cache reuse a local prefix cache would get out of a sub-agent's tool-use loop (typically high — sub-agents iterate on a stable prompt)
159
+
160
+ ## Model composition
161
+
162
+ | model | requests (main + subagent inner) |
163
+ |-------|---------:|
164
+ | `claude-opus-4-7` | 36,637 |
165
+ | `claude-haiku-4-5-20251001` | 702 |
166
+ | `claude-opus-4-6` | 343 |
167
+ | `claude-sonnet-4-6` | 84 |
168
+
169
+ ## Source
170
+
171
+ Same proxy → weka pipeline as the
172
+ [no-subagents sibling](https://huggingface.co/datasets/semianalysisai/cc-traces-weka-no-subagents-051826),
173
+ just without the post-step that strips `WekaSubagentEntry` blocks.
174
+
175
+ 1. `utils/sample_proxy_traces.py --min-trace-version 5 --min-main-turns 20 --privacy-mode anon`
176
+ 2. `utils/proxy_to_weka.py` (subagent grouping per the dashboard's
177
+ algorithm)
178
+ 3. Concatenate the resulting weka JSONs into `traces.jsonl` — one trace
179
+ per line.
180
+
181
+ The same-96-trace contract with the no-subagents sibling makes the two
182
+ variants safe to A/B compare for any benchmark that cares about
183
+ sub-agent fan-out's impact on cache-hit-rate or throughput.
plots/distributions_linear.png ADDED

Git LFS Details

  • SHA256: 12b3bdc300a57c3efb30135a05d4b93f8d68e2bebd3bf1894b2ad0ecf96f437f
  • Pointer size: 131 Bytes
  • Size of remote file: 215 kB
plots/distributions_log.png ADDED

Git LFS Details

  • SHA256: 204d4fd3adb49c21018f633de45de97cc4108e54962da15042d7f7d1d94c1d71
  • Pointer size: 131 Bytes
  • Size of remote file: 211 kB
plots/subagent_distributions_linear.png ADDED

Git LFS Details

  • SHA256: 97906c4a4c7dc7375fd22ad096f9cd44f2da8f0c9f6f7a7b80b39eeb60ffb634
  • Pointer size: 131 Bytes
  • Size of remote file: 197 kB
plots/subagent_distributions_log.png ADDED

Git LFS Details

  • SHA256: 044b3112a38b24bea0a837679054935fd67a9224cdd3151d1da070092e3ccf2c
  • Pointer size: 131 Bytes
  • Size of remote file: 205 kB
traces.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23f45691d854b364f2fb960d570fa60083ee3a63442d767201158534f9325536
3
+ size 1115513148