Skip to content

Claude Opus 5.5 (effort default (no --effort flag) · thinking on) on Finish a JSON Schema subset validator (types, JSON equality, pointer-escaped paths, $ref recursion, combinators)

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

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

Compare with other models on this task →

Summary

Exact prompt

# Task: finish the JSON Schema validator `validator.py` contains `validate(schema, instance)`, a validator for a subset of JSON Schema used by our config tooling. It handles only a few keywords and gets several of those wrong. Make it implement `SCHEMA_RULES.md` exactly (rewrite freely). Keep the function name, return format and the `SchemaError` class. Python standard library only; do not install or vendor `jsonschema`. No network. The grader runs a hidden unittest suite that calls `validate` on many schema/instance pairs and compares the returned errors (as a multiset of `(path, keyword)` pairs; order does not matter, duplicates do).

Boolean-vs-number equality, integer-valued floats, type-failure short-circuit, ~0/~1 path escaping, per-member additionalProperties errors, single anyOf/oneOf errors and recursive $ref are each pinned by exact (path, keyword) multisets. 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. All 11 hidden unittest cases pass (boolean schemas/unknown keywords, types, type short-circuit, equality, numeric and string keywords, objects and escaped paths, arrays and uniqueItems, nested paths, $ref and recursion, combinators).

Setup notes: Use Case Scout batch 7 case g10-json-schema-validator (offline fixture). Prepared with batch7/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. Claude Code's own reported cost for claude-opus-5.5: $0.221879. Score: 11/11. 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.22
Wall time
49s
Human step-ins
0
Turns
4
Model usage
ModelInput tokOutput tokCost
AClaude Opus 5.5anthropic/claude-opus-5.5effort default (no --effort flag) · thinking on85,4645,346$0.22

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Opus 5.5 (anthropic/claude-opus-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. All 11 hidden unittest cases pass (boolean schemas/unknown keywords, types, type short-circuit, equality, numeric and string keywords, objects and escaped paths, arrays and uniqueItems, nested paths, $ref and recursion, combinators).
  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": 48438,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.22187859999999998,
  "usage": {
   "input_tokens": 8,
   "cache_creation_input_tokens": 12543,
   "cache_read_input_tokens": 72913,
   "output_tokens": 5346,
   "output_tokens_details": {
    "thinking_tokens": 1209
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 12543,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 908,
     "cache_read_input_tokens": 23387,
     "cache_creation_input_tokens": 1302,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 1302
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-opus-5-5": {
    "inputTokens": 8,
    "outputTokens": 5346,
    "cacheReadInputTokens": 72913,
    "cacheCreationInputTokens": 12543,
    "webSearchRequests": 0,
    "costUSD": 0.22187859999999998,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 1209,
    "canonicalModel": "claude-opus-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": 4,
  "subtype": "success",
  "api_error_status": null,
  "result": "I rewrote `validator.py` to follow `SCHEMA_RULES.md`. The function name, the `{\"path\", \"keyword\"}` error format and `SchemaError` are unchanged. It uses only the standard library. I checked it with a set of hand-written cases and all gave the expected errors, but I haven't run it against the hidden suite.\n\n**Bugs fixed in the old version:**\n- **Missing required properties:** these were reported at `/<name>`; they now go at the object's own path, as rule 7 says.\n- **Types:** booleans were accepted as numbers or integers and `2.0` was rejected as an integer. Both are fixed. When `type` fails, that is now the only error from that schema at that location.\n- **`minimum`/`maximum`:** these were checked against booleans and wrongly-typed values; they now apply only to real numbers.\n- **`enum`:** this used Python's `==`, so `True` matched `1`. It now uses JSON equality, where `1 == 1.0` but `true != 1`, comparing inside lists and objects too.\n- **`anyOf`:** this was passing on every subschema's errors; it now gives one `anyOf` error, and only when no subschema matches.\n- **Paths:** keys weren't escaped (`a/b~c` now becomes `a~1b~0c`), and a `false` schema used to crash.\n\n**Keywords added:** `exclusiveMinimum`/`exclusiveMaximum`, `minLength`/`maxLength` (counting Unicode code points), `pattern` (using `re.search`), `additionalProperties`, `minItems`/`maxItems`, `uniqueItems` (one error for the whole array), `const`, `allOf`, `oneOf`, `not`, and `$ref`.\n\n**How I handled cases the rules don't settle:**\n- **`$ref`:** it accepts `#` and `#/$defs/<name>` and is checked alongside the other keywords in the same schema. Recursive schemas work. If a `$ref` points straight back to itself (like `{\"$ref\": \"#\"}`) at the same location, it would loop forever, so I treat that case as passing.\n- **Unresolvable `$ref`:** `SchemaError` is raised only when the validator actually reaches that `$ref`. If an earlier `type` check fails first, the bad `$ref` is never looked at and nothing is raised.\n- **Ignored values:** keyword values of the wrong shape (for example a non-list `enum` or a boolean `exclusiveMinimum`) are skipped, like unknown keywords.",
  "ttft_ms": 2216,
  "type": "result",
  "duration_ms": 48822,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1579,
  "time_to_request_ms": 257,
  "first_content_frame_ms": 1579,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly