CoolFace
Datasetpublic

semianalysisai/cc-traces-weka-with-subagents-051926

CC Traces — Weka, With Subagents, v5 only (May 20 2026) A collection of 219 multi-turn agentic traces drawn from real production traffic against the Claude Code CLI ≥ 2.1.139. Each trace captures the full request/response sequence of a single agent session, including per-request KV block hashes AND the original sub-agent fan-out structure (Task-tool spawned sub-agents grouped into WekaSubagentEntry blocks). Use this dataset when you want to: Simulate the full agentic-coding… See the full description on the dataset page: https://huggingface.co/datasets/semianalysisai/cc-traces-weka-with-subagents-051926.

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes406downloads
Dataset Card

CC Traces — Weka, With Subagents, v5 only (May 20 2026)

A collection of 219 multi-turn agentic traces drawn from real production traffic against the Claude Code CLI ≥ 2.1.139. Each trace captures the full request/response sequence of a single agent session, including per-request KV block hashes AND the original sub-agent fan-out structure (Task-tool spawned sub-agents grouped into WekaSubagentEntry blocks).

Use this dataset when you want to:

  • —Simulate the full agentic-coding workload including parallel Task-tool sub-agent fan-out
  • —Study sub-agent dispatch patterns, instance counts, durations
  • —Replay against an inference engine that should see the same concurrent- request structure a real Claude Code session generates

Filters:

  1. 1.v5 only. Every replayable request in every included session has trace_version = 5 (the latest proxy schema, o200k_base tokenizer). Sessions containing any earlier-format request are excluded entirely.
  2. 2.≥ 20 main-agent turns. Per-trace main-agent stream (the would-be no-subagents stream) must have at least 20 turns. Sub-agent fan-out is on top of that.
  3. 3.CC ≥ 2.1.139. Every replayable request in every included session originated from a Claude Code CLI build at version 2.1.139 or newer.
  4. 4.Non-conversational classifier calls excluded. Claude Code fires several short auxiliary classifier calls per session ("SUGGESTION MODE" next-input prediction, conversation-title generation, haiku intent detection, the "Security Monitor" subagent). They share a clean request shape — max_tokens <= 64 AND no tools — and produced a heavy OSL 5-10 spike (~9k+ rows at exactly OSL=7) that pollutes the published output-length distribution. They are dropped at source by shape, with an additional label/body fallback for the Security Monitor subagent specifically.
  • —Traces: 219
  • —Top-level entries: 39,726 (37,732 main turns + 1,994 subagent groups)
  • —Sub-agent inner requests: 40,367
  • —Total individual model requests: 78,099
  • —Models: claude-opus-4-7 (74,293 req), claude-opus-4-6 (2,138 req), claude-haiku-4-5-20251001 (1,163 req), claude-sonnet-4-6 (505 req)
  • —KV block size: 64 tokens
  • —Hash scope: local — block hash IDs are only comparable within a single trace; they are not a global content-addressable identity.

Important: tokenizer caveat

The in field on each request and the hash_ids array are both measured in the proxy's tokenizer (o200k_base, GPT-4o family). Anthropic typically reports ~60 % of the o200k token count for the same content. So the ISL numbers below are larger than what the Anthropic API would have billed for the same prompt — but they're self-consistent between in and hash_ids, which is what matters for KV-cache replay simulation.

What's in each trace

Top-level trace fields:

fieldtypedescription
idstrTrace identifier (the proxy session id)
modelslist[str]Models used by the trace
block_sizeintKV block size used to derive hash_ids (64)
hash_id_scopestrlocal — hash IDs are per-trace, not global
requestslist[object]Ordered list of per-request records OR WekaSubagentEntry groups

Each entry in requests is one of two shapes:

Main-agent request (type: "n" or "s")

fieldtypedescription
tfloatSeconds since start of trace
typestrn (non-streaming) or s (streaming)
modelstrTarget model for this request
inintEffective prompt tokens covered by hash_ids (proxy tokenizer)
outintOutput tokens (Anthropic-reported)
hash_idslist[int]Per-trace local block-hash IDs for the input, one per 64-token block
api_timefloatEnd-to-end server time for this call (seconds)
think_timefloat?Wall-clock gap from previous request's end (seconds)
ttftfloat?Time to first token (streaming requests only)

Sub-agent group (type: "subagent")

fieldtypedescription
tfloatStart time (seconds since trace start)
typestrAlways "subagent"
agent_idstrStable per-trace sub-agent instance id (slug + suffix)
subagent_typestrSub-agent label ("Subagent" for Claude Code ≥ 2.1.139, else the original proxy label)
duration_msintWall-clock span first→last inner request
total_tokensintSum of in + out across inner requests
tool_use_countnullNot tracked in the proxy DB
statusstrAlways "completed"
requestslist[object]Inner main-shape entries (type n — sub-agents are non-streaming)
modelslist[str]Distinct models used inside this sub-agent run

Sub-agent groups are emitted at the position of the first inner request in the chronological stream. Their inner requests have absolute t values (not relative to the group start), making sub-agent and main- agent timelines directly interleavable for replay.

hash_ids make the dataset unusually useful for KV-cache work: the contiguous common prefix between turn t and turn t − 1 exactly measures the portion of the input that a local prefix cache would be able to reuse. The same accounting applies to sub-agent inner requests within their group, and to the dispatching parent request that triggered them.

Summary statistics

Across all requests (main + sub-agent inner = 78,099 requests):

p50p75p90p95p99mean
ISL (tokens)109,729214,992394,994535,364799,788164,194
OSL (tokens)3076881,4422,2046,852694
Top entries/trace1142193695431,062181

Plots

Main-agent stream

Histograms across all 37,732 main-agent turns (sub-agent groups skipped). Same view as the no-subagents sibling — the two datasets share an identical main-agent stream.

[image] [image]

Sub-agent fan-out analysis

Histograms across all 1,994 sub-agent groups (and their 40,367 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.

[image] [image]

Six panels:

  1. 1.Sub-agent groups per trace — distribution of how many distinct sub-agent invocations each session spawns
  2. 2.Inner requests per group — depth of each sub-agent's tool-use loop
  3. 3.Group wall-clock duration — first→last inner span (seconds)
  4. 4.Group total tokens — Σ(in + out) across each group's inner requests
  5. 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)
  6. 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)

Model composition

modelrequests (main + subagent inner)
claude-opus-4-774,293
claude-opus-4-62,138
claude-haiku-4-5-202510011,163
claude-sonnet-4-6505

Source

Same proxy → weka pipeline as the no-subagents sibling, just without the post-step that strips WekaSubagentEntry blocks.

  1. 1.utils/sample_proxy_traces.py --min-trace-version 5 --min-main-turns 20 --require-cli-min 2.1.139 --privacy-mode anon (Non-conversational classifier-call exclusion — max_tokens <= 64
  2. 2.no tools array — is hardcoded into the query so the 5-10-token OSL spike doesn't leak into the published corpus. A label/body fallback for the Security Monitor subagent is layered on top.)
  3. 3.utils/proxy_to_weka.py (subagent grouping per the dashboard's algorithm)
  4. 4.Concatenate the resulting weka JSONs into traces.jsonl — one trace per line.