Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Diverging stacked bar chart with exact SVG geometry
AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener
- Estimated cost
- $0.06
- Wall time
- 14s
- Human step-ins
- 0
- Outcome
- Pass
Compare with other models on this task →
Summary
Exact prompt
# Diverging stacked bar chart with exact geometry `input.json`: `categories` (list of names) and `series` (each `{name, color, values}`, one value per category; `null` means 0). Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json` must write `answer.json` and a static `chart.svg` in the working directory. Fresh inputs are generated. ## Rules 1. Canvas 720x360. Plot area x0=60, y0=20, width 600, height 300. 2. For each category, `pos` = sum of positive values and `neg` = sum of negative values (null and 0 add nothing). `totals` = [[pos, neg], ...] in category order. 3. Raw domain: lo = min(0, min neg), hi = max(0, max pos). 4. Nice ticks: raw = (hi - lo)/5 (use 1 if hi == lo); mag = 10^floor(log10(raw)); f = raw/mag; m = 1 if f<=1, 2 if f<=2, 2.5 if f<=2.5, 5 if f<=5, otherwise 10; step = m*mag. Axis min = floor(lo/step)*step, axis max = ceil(hi/step)*step (if they are equal, add one step). Round the quotient to 9 decimals before floor/ceil so float noise doesn't add a step. Ticks run from axis min to axis max in steps (each rounded to 10 decimals). `domain` = [axis min, axis max]. 5. Tick label: the smallest d in 0..6 such that step rounded to d decimals equals step; format each tick with d decimals; a label equal to zero prints as `0`. 6. y(v) = y0 + 300*(axis max - v)/(axis max - axis min). 7. Band = 600/number of categories. Bar x = x0 + i*band + 0.15*band; width = 0.7*band. 8. Stacking: series in the given order. Positive values stack **upward from 0** on the positive stack; negative values stack **downward from 0** on a separate negative stack. A value of 0 or null draws no bar. 9. A bar from value bot to top has y = y(top) and height = y(bot) - y(top). Round x, y, width and height to 2 decimals. 10. Bar id `bar-<category index>-<series index>` (0-based), with fill = the series color. ## Outputs - `answer.json`: `{"domain", "ticks", "tick_labels", "totals", "bars": [{"id","x","y","width","height","fill"}, ...]}`, with bars in category order and then series order. - `chart.svg`: root `<svg>`, no scripts, external resources or animation. It contains `<g id="bars">` holding one `<rect id="bar-i-j" x y width height fill>` per bar, with numeric attributes equal to the JSON values (within 0.01). For tick k: `<line id="tick-k">` at y(tick) and `<text id="tick-label-k">` holding the label. Also `<line id="zero-line">` at y(0). ## Scoring Hidden checks (partial credit; all must pass): `stack_totals` (1e-6), `nice_ticks_domain` (exact labels), `bar_geometry_json` (0.011), `chart_svg_static` (parses as static SVG with the required ids and tags), `chart_svg_geometry` (rect attributes and tick-label texts read from the SVG itself), `fresh_run_1`, `fresh_run_2` (domain, labels, bars and SVG geometry on new data). 30-second limit per run.
Fixes the subjective look of a chart to exact numbers. Separate +/- stacks, the 2.5 step, float-noise floors and label decimals are easy to get slightly wrong. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked). Oct 20, 2026: Scorer mode: file-based. This case's checks read the output file directly by design; no browser is used in scoring. Measured data unchanged.
Success criteria: 1. stack_totals 2. nice_ticks_domain 3. bar_geometry_json 4. chart_svg_static 5. chart_svg_geometry 6. fresh_run_1 7. fresh_run_2
Setup notes: Oct 20, 2026: Scorer mode: file-based. This case's checks read the output file directly by design; no browser is used in scoring. Measured data unchanged. Use Case Scout batch 12 case m11-stacked-chart-geometry (offline, synthetic fixture). Prepared with batch12/prepare.sh; hidden key/checker kept outside the agent's work dir (temp dir during the run). Prompt = TASK.md verbatim. Scored with the case's scorer: `python score.py WORKDIR KEYDIR` (python3, run from the case dir). Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. 1-min load average at scoring 0.25 (8 cores). chart.svg rendered offline with google-chrome headless (CDP pipe, network blocked): PNG 1280x800 at ~3 s after load; MP4 ~6 s captured at 1280x720, H.264 1280x720. Claude Code's own reported cost for claude-sonnet-5.5: $0.05784. Score: 7/7. Cost is an ESTIMATE: measured tokens x pricing.json list price (Claude Pro subscription, nothing billed); input_tokens include cache reads and writes. Single run.
Estimated cost List-price estimate; not actually billed.
Output
Metrics
- Estimated cost
- $0.06
- Wall time
- 14s
- Human step-ins
- 0
- Turns
- 2
| Model | Input tok | Output tok | Cost |
|---|---|---|---|
| AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on | 40,086 | 2,060 | $0.06 |
Reproduce this run
- Use the use case prompt on the use case page.
- Same setup: Claude Sonnet 5.5 (anthropic/claude-sonnet-5.5, effort default (no --effort flag) · thinking on) via
Claude Code 2.1.299 (headless -p), cloud. - It counts as a success only if it meets every success criterion: 1. stack_totals 2. nice_ticks_domain 3. bar_geometry_json 4. chart_svg_static 5. chart_svg_geometry 6. fresh_run_1 7. fresh_run_2
- Log model, tokens, wall time, human step-ins and the evidence log, then submit it as a reproduction. A different model? Submit a head-to-head rerun.
How runs are scored: Methodology.
Was this useful?
Automated checks
Trust 80% comes from these checks (how Trust % works).
- Run date is not in the future : passed
- Model is in the dated pricing table : passed
- Cost recomputed from tokens matches : passed
- Cached tokens are consistent : passed
- Output throughput is plausible : passed
- Autonomy matches step-ins : passed
- Step-ins do not exceed turns : passed
- Retries agree with first-try result : passed
- Evidence log SHA-256 matches : passed
- Evidence log is substantial : passed
Evidence log
[
{
"duration_api_ms": 12923,
"stop_reason": "end_turn",
"session_id": "[REDACTED]",
"total_cost_usd": 0.0578403,
"usage": {
"input_tokens": 4,
"cache_creation_input_tokens": 8519,
"cache_read_input_tokens": 31563,
"output_tokens": 2060,
"output_tokens_details": {
"thinking_tokens": 230
},
"server_tool_use": {
"web_search_requests": 0,
"web_fetch_requests": 0
},
"service_tier": "standard",
"cache_creation": {
"ephemeral_1h_input_tokens": 8519,
"ephemeral_5m_input_tokens": 0
},
"inference_geo": "global",
"iterations": [
{
"input_tokens": 2,
"output_tokens": 306,
"cache_read_input_tokens": 19024,
"cache_creation_input_tokens": 2034,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 2034
},
"type": "message"
}
],
"speed": "standard",
"fallback_credit": null
},
"modelUsage": {
"claude-sonnet-5-5": {
"inputTokens": 4,
"outputTokens": 2060,
"cacheReadInputTokens": 31563,
"cacheCreationInputTokens": 8519,
"webSearchRequests": 0,
"costUSD": 0.0578403,
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"thinkingTokens": 230,
"canonicalModel": "claude-sonnet-5-5",
"provider": "firstParty",
"costBasis": "list"
}
},
"permission_denials": [],
"terminal_reason": "completed",
"fast_mode_state": "off",
"fast_mode_disabled_reason": "sdk_opt_in_required",
"subagent_stats": {
"spawned": 0,
"requested": {
"background": 0,
"foreground": 0,
"unset": 0
},
"started_in_background": 0,
"max_depth": 0,
"spawned_by_subagents": 0,
"completed": 0,
"failed": 0,
"killed": {
"parent": 0,
"user": 0,
"system": 0
},
"refused": {
"depth_limit": 0,
"concurrency_limit": 0,
"budget": 0
},
"by_type": {}
},
"safety_stops": 0,
"is_error": false,
"num_turns": 2,
"subtype": "success",
"api_error_status": null,
"result": "I wrote `solve.py`. I ran it once on a small two-category sample I made up, and it wrote `answer.json` and `chart.svg` without errors. I only printed `answer.json`. I didn't open `chart.svg` or check it against the SVG requirements. Nothing was run against a real generated input.\n\nOn the sample the output was what I expected by hand:\n- **Domain and ticks:** the domain was [-4, 4] with ticks -4, -2, 0, 2, 4.\n- **Bars:** positive values stacked upward from 0 and negative values downward from 0, in series order.\n\nThe SVG has the required `bars` group, the `bar-i-j` rects, the `tick-k` lines, the `tick-label-k` text elements and `zero-line`.\n\nRun it with `python solve.py input.json answer.json`. I haven't timed it, but it's a single pass over the data, so the 30-second limit shouldn't be a concern.",
"ttft_ms": 2882,
"type": "result",
"duration_ms": 13275,
"uuid": "[REDACTED]",
"ttft_stream_ms": 745,
"time_to_request_ms": 265,
"first_content_frame_ms": 746,
"queued_turn_count": 0,
"result_index": 0
}
]