Skip to content

Claude Opus 5.5 (effort default (no --effort flag) · thinking on) on Retirement drawdown with a 4% rule, inflation raises and a skip-raise-after-loss guardrail

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.15
Wall time
28s
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Retirement drawdown: the 4% rule with inflation raises and a guardrail `input.json` describes one retiree and one assumed sequence of yearly market returns and inflation rates (synthetic data). Write `solve.py` (Python 3 standard library only) so that `python solve.py input.json answer.json` reads the input and writes the answer. We re-run it on fresh inputs of the same shape, so do not hard-code anything. ## Input `start_age`, `end_age` (integers), `start_balance`, `withdrawal_rate` (e.g. 0.04), `fee_rate` (yearly fraction), `returns` and `inflation` (lists of fractions, one per year, length `end_age - start_age`). ## Rules 1. There are n = `end_age - start_age` years, k = 0 .. n-1. Year k is the year the retiree is age `start_age + k`. 2. The planned withdrawal for year 0 is W0 = `start_balance * withdrawal_rate`. For k >= 1 the planned withdrawal is last year's planned withdrawal times `(1 + inflation[k-1])`. 3. **Guardrail scenario only:** for k >= 1, if `returns[k-1] < 0` (strictly) the raise is skipped that year: the planned withdrawal stays equal to last year's planned withdrawal. Later raises apply to the frozen amount; there is no catch-up. 4. Each year, the withdrawal is taken at the start of the year: actual withdrawal w = min(planned, balance). Then balance = (balance - w) * (1 + returns[k]) * (1 - fee_rate). 5. `depletion_age` = `start_age + k` for the first year k where w < planned (the full planned amount could not be paid), otherwise `null`. `shortfall_total` = sum over all years of (planned - w). `total_withdrawn` = sum of w. 6. `path` = the balance at the end of each year (after rule 4), n values. `final_balance` = the last one. `real_final_balance` = `final_balance` divided by the product of `(1 + inflation[k])` over all n years. 7. Keep full floating-point precision while computing; round money outputs to 2 decimals only when writing. ## Output `answer.json`: `{"standard": S, "guardrail": G}` where each of S and G is an object with keys `final_balance`, `real_final_balance`, `total_withdrawn`, `shortfall_total`, `depletion_age`, `path`. "standard" ignores rule 3; "guardrail" applies it. ## Chart (required visual) Also write `chart.svg` in the working directory: a static, self-contained SVG (root element `<svg>`, no scripts, no external images, fonts, stylesheets or links) that can be rendered headless. It must contain `<polyline id="standard">` and `<polyline id="guardrail">` drawing the two `path` balance series against year. ## Scoring The `chart_svg_static` check (one more check, counted in partial credit) passes only if `chart.svg` exists after the fixture run, parses, has root `<svg>`, contains the ids above with the stated tags, and has no `<script>`, `<img>`/`<image>`, `<link>`, `<iframe>`/`<object>`/`<embed>`, `on*` handlers, or `href`/`src` pointing anywhere except `#...` or `data:`. Its drawing is not graded. Hidden checks (partial credit = fraction passed; all must pass). Money values must match the reference within 0.011; `depletion_age` exactly; `path` must have exactly n values. - `standard_path`, `standard_summary` (the five summary keys), `guardrail_scenario`: on the given `input.json`. - `fresh_standard`, `fresh_guardrail`: on a fresh input. - `depletion_and_shortfall`: both scenarios on a fresh input where the money runs out. Each run has a 60-second limit.

Exact year-by-year balances depend on withdrawal timing, fee application order, the strict-negative guardrail with no catch-up, and how depletion and shortfall are recorded; fresh inputs include one where money runs out. 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. standard_path 2. standard_summary 3. guardrail_scenario 4. fresh_standard 5. fresh_guardrail 6. depletion_and_shortfall 7. chart_svg_static

Setup notes: Use Case Scout batch 9 case j01-retirement-drawdown (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. Visual output (chart.svg) rendered offline to PNG with google-chrome headless, network blocked, 1280x800 at ~3 s after load. Claude Code's own reported cost for claude-opus-5.5: $0.151256. Score: 7/7. 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.

Output

Metrics

Estimated cost
$0.15
Wall time
28s
Human step-ins
0
Turns
4
Model usage
ModelInput tokOutput tokCost
AClaude Opus 5.5anthropic/claude-opus-5.5effort default (no --effort flag) · thinking on60,3113,064$0.15

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. standard_path 2. standard_summary 3. guardrail_scenario 4. fresh_standard 5. fresh_guardrail 6. depletion_and_shortfall 7. chart_svg_static
  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": 27200,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.1512558,
  "usage": {
   "input_tokens": 6,
   "cache_creation_input_tokens": 9986,
   "cache_read_input_tokens": 50319,
   "output_tokens": 3064,
   "output_tokens_details": {
    "thinking_tokens": 180
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 9986,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 562,
     "cache_read_input_tokens": 19423,
     "cache_creation_input_tokens": 2709,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 2709
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-opus-5-5": {
    "inputTokens": 6,
    "outputTokens": 3064,
    "cacheReadInputTokens": 50319,
    "cacheCreationInputTokens": 9986,
    "webSearchRequests": 0,
    "costUSD": 0.1512558,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 180,
    "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 both `answer.json` and `chart.svg` without errors. I can't run the hidden checks here, so I haven't confirmed the results match the reference values.\n\nResults on the given input (neither scenario runs out of money; both paths have 26 values):\n\n| | Standard | Guardrail |\n|---|---|---|\n| Final balance | 686,614.75 | 1,008,139.92 |\n| Real final balance | 353,101.06 | 518,449.79 |\n| Total withdrawn | 1,817,310.89 | 1,652,713.06 |\n| Shortfall | 0 | 0 |\n| Depletion age | none | none |\n\nThe guardrail scenario skips raises after negative-return years, so it withdraws less in total and ends with about $320k more.\n\n**Depletion test:** I also ran it on a copy of the input with the withdrawal rate raised to 9%, so the money runs out. The standard scenario depletes at age 73 and the guardrail scenario at 74. Both end at a balance of 0 with a positive shortfall total.\n\n**How the rules are applied:**\n- Each year's raise uses last year's inflation. In the guardrail scenario, that raise is skipped only when last year's return was strictly below zero.\n- The depletion age is the first year the withdrawal is less than the planned amount.\n- Rounding to 2 decimals happens only when the answer is written.\n\n**Chart:** `chart.svg` parses as XML and has `<polyline id=\"standard\">` and `<polyline id=\"guardrail\">` plotting balance against age. It has gridlines, axis labels and a label at the end of each line. It contains no scripts, images, links or external references.",
  "ttft_ms": 3252,
  "type": "result",
  "duration_ms": 27631,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1332,
  "time_to_request_ms": 256,
  "first_content_frame_ms": 1332,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly