Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Model ladder: fix 10 real merged bugs with tests hidden

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

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.07
Wall time
3m
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt (this run)

You are working in a checkout of the ai/nanoid repository. A user filed this bug report: --- customAlphabet()/customRandom() return a constant string for a non-integer size Since 5.1.8, calling a generator with a fractional size gives broken ids on power-of-two alphabets, e.g. `customAlphabet('0123456789abcdef')(16.5)` returns `"00000000000000000"` (the first alphabet character repeated) in the browser build, and the node build is also wrong. I'd expect a fractional size to behave like its integer part (16 random characters here), in both the node and browser builds, and for `customRandom()` too. --- Fix the bug in the library code. Dependencies are already installed (node_modules). Keep the change minimal and in the style of the codebase; you may add or update tests. Make sure the existing test suite still passes. You have no internet access.

Five real bug fixes merged into popular open-source libraries after the models' training cutoff (humanize, marshmallow, tenacity, nanoid, path-to-regexp). Each agent starts from the commit before the fix with only a symptom-style bug report, and the fix PR's own regression tests are applied afterwards to check the result. The size of the agent's source change is compared with the human fix. 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). Upstream fix being reproduced: https://github.com/ai/nanoid/pull/616, https://github.com/ai/nanoid/commit/0b2cec58ffd5ddc45978bf75a3bab46f53c76128.

Success criteria: Hidden PR tests pass; existing suite stays green; diff under 2x the human diff size.

Setup notes: Real merged bug fix: ai/nanoid https://github.com/ai/nanoid/pull/616 (merged after the models' Jun 2026 cutoff). Agent got a history-free snapshot of the parent commit ccb0e6ee55 with deps installed, and a symptom-only bug report written by the runner from the PR description (no fix hints). The PR's test files were overlaid only after the agent finished. Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Diff-size flag (not scored): agent changed 4 source lines vs 6 in the human fix (allowance 20; within allowance). Claude Code's own reported cost for claude-sonnet-5.5: $0.074235. Score: 2/2. 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.07
Wall time
3m
Human step-ins
0
Turns
7
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on153,0911,541$0.07

Reproduce this run

  1. Use the exact prompt shown above for this run (the use case page has the shared prompt).
  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: Hidden PR tests pass; existing suite stays green; diff under 2x the human diff size.
  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": 17575,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.07423460000000001,
  "usage": {
   "input_tokens": 14,
   "cache_creation_input_tokens": 11151,
   "cache_read_input_tokens": 141926,
   "output_tokens": 1541,
   "output_tokens_details": {
    "thinking_tokens": 194
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 11151,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 437,
     "cache_read_input_tokens": 23441,
     "cache_creation_input_tokens": 249,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 249
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 14,
    "outputTokens": 1541,
    "cacheReadInputTokens": 141926,
    "cacheCreationInputTokens": 11151,
    "webSearchRequests": 0,
    "costUSD": 0.07423460000000001,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 194,
    "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": 7,
  "subtype": "success",
  "api_error_status": null,
  "result": "Fractional sizes now behave like their integer part. `customAlphabet('0123456789abcdef')(16.5)` returns 16 random characters instead of a constant string, and `customAlphabet('abc')(5.9)` returns 5.\n\n**Fix:** the generator closures returned by `customRandom` (which `customAlphabet` uses) never converted `size` to an integer. In the power-of-two path, `id.length >= size` could then never be true after a clean pass, so the loop kept running and re-reading the same bytes. I added `size |= 0` before the `if (!size) return ''` check in both closures (the power-of-two path and the general path), in both `index.js` and `index.browser.js`.\n\n**Tests:** I added a `truncates fractional size` test to `test/index.test.js`. `node --test test/index.test.js` passes (63 tests, 0 failures).\n\n**Full run:** `node --test` over the whole repo shows one failure, `test/demo/index.js`, which isn't part of the touched code. I didn't investigate it or run it against the original code, so I can't say whether it was already failing.\n\n`npm test` itself couldn't complete here. The lint step needs Node 20.19 with TypeScript config support or newer, and coverage needs Node 22.8 or newer. This machine has Node 20.19.2, so neither ran.",
  "ttft_ms": 2079,
  "type": "result",
  "duration_ms": 173261,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1488,
  "time_to_request_ms": 208,
  "first_content_frame_ms": 1488,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly