Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on iCalendar recurrence expansion with time-zone transitions, exceptions and overrides
AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener
- Estimated cost
- $0.16
- Wall time
- 48s
- Human step-ins
- 0
- Outcome
- Pass
Compare with other models on this task →
Summary
Exact prompt
# Calendar (iCalendar subset) recurrence expansion `input.json` names `calendar.ics` and gives `timezones` (each with `initial_offset_min` and `transitions` [[UTC instant, new offset minutes], ...]; offset = local minus UTC) and a UTC window `window_start`..`window_end`. Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json`. Fresh calendars are generated. Everything you need is below. ## Parsing 1. Lines end in CRLF (accept LF too). A line starting with a space or tab continues the previous line (drop the line break and that one character). Blank lines are ignored. 2. Content line: `NAME *(;PARAM=value) : value`. Names and parameter names are case-insensitive. Parameter values may be double-quoted (quotes removed; `;` and `:` inside quotes are literal). The value starts after the first `:` that is not inside quotes. 3. Only `VEVENT` components count (`events_parsed` = number of VEVENT blocks, overrides included). Nested components (e.g. `VALARM`) inside a VEVENT are skipped entirely, properties included. For repeated properties, the first wins, except that `EXDATE` and `RDATE` accumulate (comma lists allowed). 4. Text unescaping (SUMMARY): `\\` -> `\`, `\;` -> `;`, `\,` -> `,`, `\n` or `\N` -> newline. 5. Date-times: `YYYYMMDDTHHMMSSZ` is UTC; `YYYYMMDDTHHMMSS` with `TZID=` is local time in that zone (no TZID: treat as UTC); `VALUE=DATE` or an 8-digit value is an all-day date. 6. Local -> UTC: find each interval of the zone's offset table whose offset o makes local - o fall inside that interval. If several do (repeated hour), take the earliest UTC instant. If none do (skipped hour), use local - (offset in force before that transition). 7. Length: `DTEND` - `DTSTART` (both converted to UTC; dates for all-day), or `DURATION` (`P[nW][nD][T[nH][nM][nS]]`), else 0 for timed events and 1 day for all-day ones. ## Recurrence (RRULE: FREQ, INTERVAL, COUNT, UNTIL, BYDAY, BYMONTHDAY, BYMONTH) 8. Expand in **local wall time** (the DTSTART's zone) and keep DTSTART's time of day; convert each occurrence to UTC with rule 6. 9. DAILY: every INTERVAL days; BYMONTH, BYMONTHDAY and BYDAY filter. WEEKLY: weeks start Monday; every INTERVAL weeks from DTSTART's week; BYDAY lists the days (default: DTSTART's weekday); BYMONTH/BYMONTHDAY filter. MONTHLY: every INTERVAL months; days = BYMONTHDAY (negative counts from month end; days that don't exist are skipped) and/or BYDAY (`MO` = every Monday, `2TU` = second Tuesday, `-1FR` = last Friday). If both are given, take the intersection; if neither, use DTSTART's day of month (skip months without it). YEARLY: every INTERVAL years; months = BYMONTH (default DTSTART's month), with days chosen as in MONTHLY. 10. Candidates before DTSTART are dropped; DTSTART itself is an occurrence only if it matches the rule. Occurrences are generated in time order. COUNT counts generated occurrences **before** EXDATE removal. UNTIL is inclusive and compared in UTC (a date-only UNTIL on a timed event means 23:59:59 UTC that day; on all-day events compare dates). 11. Add RDATEs, then remove EXDATEs (matched as UTC instants or dates). 12. Overrides: a VEVENT with `RECURRENCE-ID` and the same UID replaces the occurrence whose UTC start equals it: it uses its own DTSTART, length and SUMMARY, and has `override: true`. `STATUS:CANCELLED` removes that occurrence. 13. An event without RRULE has one occurrence (plus RDATEs). ## Output Occurrences overlapping the window: timed events with start < window_end and end > window_start (zero-length: start in [window_start, window_end)); all-day events compare dates the same way. Each is `{"uid", "summary", "start", "end", "all_day", "override"}` with `YYYY-MM-DDTHH:MM:SSZ` (UTC) or `YYYY-MM-DD` (all-day). Sort by start (all-day dates count as 00:00:00Z), then uid. `answer.json`: `{"occurrences": [...], "count": n, "events_parsed": n}` ## Scoring Hidden checks (partial credit; all must pass; exact): `unfold_unescape_parse`, `weekly_tz_exdate_override`, `monthly_byday_bymonthday`, `all_day_and_yearly`, `daily_until_rdate_cancel`, `dst_gap_overlap_zero_length`, `full_sorted_list` on the given calendar; `fresh_run_1`, `fresh_run_2`. Per-family checks compare the occurrences whose summary starts with that family's text, in order. 30-second limit per run.
Wall-clock expansion across DST with skipped and repeated hours, COUNT before EXDATE, negative BYMONTHDAY and -1FR, inclusive UNTIL, and overrides keyed on UTC RECURRENCE-ID. 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. unfold_unescape_parse 2. weekly_tz_exdate_override 3. monthly_byday_bymonthday 4. all_day_and_yearly 5. daily_until_rdate_cancel 6. dst_gap_overlap_zero_length 7. full_sorted_list 8. fresh_run_1 9. fresh_run_2
Setup notes: Use Case Scout batch 12 case m10-ics-recurrence-expansion (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.24 (8 cores). Claude Code's own reported cost for claude-sonnet-5.5: $0.155027. Score: 9/9. 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.16
- Wall time
- 48s
- Human step-ins
- 0
- Turns
- 4
| Model | Input tok | Output tok | Cost |
|---|---|---|---|
| AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on | 102,492 | 7,145 | $0.16 |
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. unfold_unescape_parse 2. weekly_tz_exdate_override 3. monthly_byday_bymonthday 4. all_day_and_yearly 5. daily_until_rdate_cancel 6. dst_gap_overlap_zero_length 7. full_sorted_list 8. fresh_run_1 9. 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": 46465,
"stop_reason": "end_turn",
"session_id": "[REDACTED]",
"total_cost_usd": 0.1550266,
"usage": {
"input_tokens": 8,
"cache_creation_input_tokens": 18798,
"cache_read_input_tokens": 83686,
"output_tokens": 7145,
"output_tokens_details": {
"thinking_tokens": 1573
},
"server_tool_use": {
"web_search_requests": 0,
"web_fetch_requests": 0
},
"service_tier": "standard",
"cache_creation": {
"ephemeral_1h_input_tokens": 18798,
"ephemeral_5m_input_tokens": 0
},
"inference_geo": "global",
"iterations": [
{
"input_tokens": 2,
"output_tokens": 400,
"cache_read_input_tokens": 30405,
"cache_creation_input_tokens": 932,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 932
},
"type": "message"
}
],
"speed": "standard",
"fallback_credit": null
},
"modelUsage": {
"claude-sonnet-5-5": {
"inputTokens": 8,
"outputTokens": 7145,
"cacheReadInputTokens": 83686,
"cacheCreationInputTokens": 18798,
"webSearchRequests": 0,
"costUSD": 0.1550266,
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"thinkingTokens": 1573,
"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": 4,
"subtype": "success",
"api_error_status": null,
"result": "I wrote `solve.py` and ran it on the given calendar. It exits cleanly and writes `answer.json` with 126 occurrences and `events_parsed` 11. I haven't compared the output to any expected answer, since the hidden checks aren't available. I only skimmed the first ~60 of the 126 occurrences.\n\nIn that skim:\n- **Override:** the briefing moved to 2026-03-05T06:00Z shows `override: true`.\n- **Skipped hour:** the \"Gap test\" event (02:30 on 2026-03-08 in `Test/West`, inside the spring-forward gap) lands at 07:30Z, which is local minus the offset in force before the transition.\n- **Other families:** the all-day, monthly and daily events also look plausible.\n\nI haven't looked at anything after mid-June, so the repeated-hour case (the \"Overlap test\" event on 2026-11-01) and the zero-length marker are unchecked. Neither are the `RDATE` entries or the cancelled occurrence on 2026-11-11. The rest of the calendar and the sort order are also unchecked.\n\nThe script is Python 3 standard library only. It runs instantly on this input, so the 30-second limit isn't a concern.",
"ttft_ms": 1925,
"type": "result",
"duration_ms": 46979,
"uuid": "[REDACTED]",
"ttft_stream_ms": 1175,
"time_to_request_ms": 303,
"first_content_frame_ms": 1175,
"queued_turn_count": 0,
"result_index": 0
}
]