Skip to content

Claude Haiku 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 Haiku 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.0049
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-haiku-5.5: $0.004872. 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.0049
Wall time
19s
Human step-ins
0
Turns
5
Model usage
ModelInput tokOutput tokCost
AClaude Haiku 5.5anthropic/claude-haiku-5.5effort default (no --effort flag) · thinking on109,0893,249$0.0049

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Haiku 5.5 (anthropic/claude-haiku-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": 17671,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.004872410000000001,
  "usage": {
   "input_tokens": 10,
   "cache_creation_input_tokens": 11348,
   "cache_read_input_tokens": 97731,
   "output_tokens": 3249,
   "output_tokens_details": {
    "thinking_tokens": 1143
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 11348,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 728,
     "cache_read_input_tokens": 23550,
     "cache_creation_input_tokens": 337,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 337
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-haiku-5-5": {
    "inputTokens": 10,
    "outputTokens": 3249,
    "cacheReadInputTokens": 97731,
    "cacheCreationInputTokens": 11348,
    "webSearchRequests": 0,
    "costUSD": 0.004872410000000001,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 1143,
    "canonicalModel": "claude-haiku-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": 5,
  "subtype": "success",
  "api_error_status": null,
  "result": "I wrote `solve.py` in the work directory. It runs on the given input and gives these results:\n\n| Key | Value |\n|---|---|\n| `target` | 5225054.28 |\n| `target_with_part_time` | 4723009.09 |\n| `required_contribution` | 121801.85 |\n| `required_contribution_with_part_time` | 109953.72 |\n| `required_savings_rate` | 0.951577 |\n| `projected_at_retire_age` | 2606301.4 |\n| `earliest_retire_age` | 67 |\n| `earliest_retire_age_with_part_time` | 65 |\n\nI ran it with `python3 -I solve.py input.json /tmp/out_j04/answer.json`, so the answer file went to `/tmp/out_j04/` rather than the work directory. I did not check these numbers against an independent calculation. The spot check I did by hand was rough, so treat the figures as unverified until a second implementation confirms them.\n\nChoices I made where the spec was silent:\n- If the retirement age is not after the current age, `required_contribution` is 0, since the growth factor would divide by zero.\n- A zero `gross_income` gives a savings rate of 0 instead of raising an error.\n- Earliest-age comparisons use the unrounded projection and target, so rounding never changes which age qualifies.",
  "ttft_ms": 1624,
  "type": "result",
  "duration_ms": 18056,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1444,
  "time_to_request_ms": 248,
  "first_content_frame_ms": 1444,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly