Skip to content

Claude Opus 5.5 (effort default (no --effort flag) · thinking on) on Work backward from a retirement budget to a savings target, contributions and earliest retirement age

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

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

Compare with other models on this task →

Summary

Exact prompt

# Work backward from a retirement budget: savings target, contributions and earliest retirement age `input.json` describes a saver (synthetic numbers). Write `solve.py` (Python 3 standard library only) so that `python solve.py input.json answer.json` computes how much they need, how much they must save each year, and the earliest age they could retire. We re-run it on fresh inputs, so do not hard-code anything. ## Input `current_age`, `retire_age`, `end_age` (integers), `spend_today` (yearly spending in today's dollars), `inflation`, `return_pre` (yearly return before retirement, never 0), `return_post` (after), `current_savings`, `gross_income`, `actual_contribution` (what they save per year now), `part_time_income_today` (yearly part-time income in today's dollars), `part_time_years`. ## Rules 1. For a retirement age A, the first retirement year's spending is S = `spend_today * (1 + inflation) ** (A - current_age)`; spending in retirement year k (k = 0 .. end_age - A - 1) is S * (1 + inflation) ** k. 2. Part-time variant: income in retirement year k is `part_time_income_today * (1 + inflation) ** (A - current_age + k)` for k < `part_time_years`, else 0. The withdrawal is max(0, spending - income). 3. Withdrawals happen at the start of each retirement year. The **target** for age A is the sum over k of withdrawal_k / (1 + return_post) ** k (no part-time income), and **target_with_part_time** uses rule 2. 4. Saving: with m = A - current_age and g = (1 + return_pre) ** m, the projected savings at A with a level contribution C at the end of each year is `current_savings * g + C * (g - 1) / return_pre`. 5. `required_contribution` = the C that makes the projection equal the target for A = `retire_age`, but never below 0; the same with the part-time target gives `required_contribution_with_part_time`. `required_savings_rate` = required_contribution / gross_income (6 decimals). `projected_at_retire_age` = the projection with C = `actual_contribution`. 6. `earliest_retire_age` = the smallest integer A from current_age + 1 to end_age - 1 where the projection with `actual_contribution` >= the target for that A; `null` if none. `earliest_retire_age_with_part_time` does the same against the part-time target. 7. Round money to 2 decimals only when writing. ## Output `answer.json` keys: `target`, `target_with_part_time`, `required_contribution`, `required_contribution_with_part_time`, `required_savings_rate`, `projected_at_retire_age`, `earliest_retire_age`, `earliest_retire_age_with_part_time`. ## Scoring Hidden checks (partial credit = fraction passed; all must pass), money within 0.011, rate within 0.000001, ages exact: `savings_target`, `part_time_target`, `required_contributions`, `earliest_ages` on the given input; `fresh_run_1` and `fresh_run_2_edge_cases` (all keys; the second input has part-time income above spending and a small contribution) on fresh inputs. Each run has a 60-second limit.

Start-of-year withdrawals discounted at the post-retirement return, part-time income inflated from today and floored at zero withdrawals, end-of-year contribution annuity, and a per-age search where the target moves with the age. 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).

These are synthetic test cases for comparing AI models, not financial advice.

Success criteria: 1. savings_target 2. part_time_target 3. required_contributions 4. earliest_ages 5. fresh_run_1 6. fresh_run_2_edge_cases

Setup notes: Use Case Scout batch 9 case j04-reverse-retirement-plan (offline fixture). Prepared with batch9/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.107301. Score: 6/6. 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.11
Wall time
19s
Human step-ins
0
Turns
4
Model usage
ModelInput tokOutput tokCost
AClaude Opus 5.5anthropic/claude-opus-5.5effort default (no --effort flag) · thinking on57,3641,696$0.11

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. savings_target 2. part_time_target 3. required_contributions 4. earliest_ages 5. fresh_run_1 6. fresh_run_2_edge_cases
  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": 18262,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.1073008,
  "usage": {
   "input_tokens": 6,
   "cache_creation_input_tokens": 7934,
   "cache_read_input_tokens": 49424,
   "output_tokens": 1696,
   "output_tokens_details": {
    "thinking_tokens": 109
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 7934,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 596,
     "cache_read_input_tokens": 18760,
     "cache_creation_input_tokens": 1320,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 1320
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-opus-5-5": {
    "inputTokens": 6,
    "outputTokens": 1696,
    "cacheReadInputTokens": 49424,
    "cacheCreationInputTokens": 7934,
    "webSearchRequests": 0,
    "costUSD": 0.1073008,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 109,
    "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 wrote `solve.py` and ran it on the given `input.json`. It wrote this `answer.json`:\n\n| Key | Value |\n|---|---|\n| `target` | 5,225,054.28 |\n| `target_with_part_time` | 4,723,009.09 |\n| `required_contribution` | 121,801.85 |\n| `required_contribution_with_part_time` | 109,953.72 |\n| `required_savings_rate` | 0.951577 |\n| `projected_at_retire_age` | 2,606,301.40 |\n| `earliest_retire_age` | 67 |\n| `earliest_retire_age_with_part_time` | 65 |\n\nThere's nothing to compare these numbers against, so their correctness isn't confirmed beyond the code following the rules as written. I haven't tried it on other inputs, including one like the second hidden test where part-time income exceeds spending.\n\nThe answer makes sense: they save 60,000 a year, but retiring at 56 would take about 121,800 a year, roughly 95% of their income. With what they save now, the earliest they could retire is 67, or 65 with part-time work.\n\nHow the script handles the edge cases:\n- **Part-time income above spending:** that year's withdrawal is set to 0 instead of going negative, as rule 2 says.\n- **Already have enough saved:** the required contribution is set to 0 instead of going negative, and the savings rate is calculated from that 0.\n- **No age works:** the earliest-age keys are written as `null`.\n- **`gross_income` of 0:** the rules don't cover this, so I chose to write the savings rate as 0 rather than let the script crash.\n\nValues are kept at full precision and only rounded when the file is written.",
  "ttft_ms": 2013,
  "type": "result",
  "duration_ms": 18621,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1349,
  "time_to_request_ms": 248,
  "first_content_frame_ms": 1349,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly