Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Turn a minute-by-minute common-free-time scan into a sweep that handles 3,000 calendars in <3 s with identical output

AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-17 · by @bobsiopener

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.04
Wall time
12s
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Task: make common_free fast `slots.py:common_free` is correct but far too slow for real calendars (it scans every minute). Rewrite it so that it returns exactly the same result (same list of tuples, same order) for every input, but runs fast: the grader times a call with 3,000 people x 60 busy intervals each over a horizon of 50,000,000 minutes and requires < 3 s wall-clock, and compares your output with the original on many random and edge-case inputs (touching/overlapping/empty intervals, intervals outside the window, min_len boundaries, start == end). Keep the function name and signature. Standard library only. No network.

The rewrite is short, but exact equality on edge cases (empty/inverted intervals, clipping, min_len=0, start==end, touching intervals) is where sloppy sweeps fail. 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).

Success criteria: 1. output_identical: output equals the original implementation on 11 edge cases and 400 seeded random inputs. 2. fast_enough: one call with 3,000 people x 60 intervals over a 50,000,000-minute horizon takes < 3.0 s (subprocess capped at 30 s; timeout = fail).

Setup notes: Use Case Scout batch 5 case e06-perf-common-free-slots (offline fixture). Prepared with batch5/prepare.sh; hidden key/tests kept outside the agent's work dir. Prompt = TASK.md verbatim. Scored with the scout's scorer: `python score.py WORKDIR KEYDIR`. Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. 1-min load average at scoring: 0.33. Claude Code's own reported cost for claude-sonnet-5.5: $0.044772. Score: 2/2 checks. 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.

Metrics

Estimated cost
$0.04
Wall time
12s
Human step-ins
0
Turns
3
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on55,9061,274$0.04

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. 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.
  3. It counts as a success only if it meets every success criterion: 1. output_identical: output equals the original implementation on 11 edge cases and 400 seeded random inputs. 2. fast_enough: one call with 3,000 people x 60 intervals over a 50,000,000-minute horizon takes < 3.0 s (subprocess capped at 30 s; timeout = fail).
  4. 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?

⇄ Rerun on another model

Automated checks

Trust 80% comes from these checks (how Trust % works).

Evidence log
[
 {
  "duration_api_ms": 11145,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.0447723,
  "usage": {
   "input_tokens": 6,
   "cache_creation_input_tokens": 6777,
   "cache_read_input_tokens": 49123,
   "output_tokens": 1274,
   "output_tokens_details": {
    "thinking_tokens": 159
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 6777,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 444,
     "cache_read_input_tokens": 18534,
     "cache_creation_input_tokens": 782,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 782
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 6,
    "outputTokens": 1274,
    "cacheReadInputTokens": 49123,
    "cacheCreationInputTokens": 6777,
    "webSearchRequests": 0,
    "costUSD": 0.0447723,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 159,
    "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": 3,
  "subtype": "success",
  "api_error_status": null,
  "result": "I rewrote `common_free` in `slots.py` as a sort-and-sweep instead of a per-minute scan. The signature is unchanged and it uses only the standard library.\n\nIt first drops the empty intervals (`s >= e`) and any that fall entirely outside `[start, end)`, then sorts the rest. It then walks them once, merging overlaps, and emits each gap of at least `min_len`.\n\n- **Correctness:** I compared it against the original on 20,000 small random cases. These included overlapping and touching intervals, intervals outside the window, empty intervals, `min_len` from -1 to 6, and `start == end` or `start > end`. All results matched exactly.\n- **Speed:** the grader's size (3,000 people \u00d7 60 intervals over 50,000,000 minutes) ran in about 0.09 s, against the 3 s limit.\n\nMy timing used random intervals of up to 100,000 minutes each, so it isn't the grader's exact data. Cost grows with the number of intervals rather than the horizon, so I don't expect that to change much.\n\nI haven't tested non-integer times.",
  "ttft_ms": 1952,
  "type": "result",
  "duration_ms": 11801,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1662,
  "time_to_request_ms": 207,
  "first_content_frame_ms": 1662,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly