Skip to content

rightsize 0.10.2

Choose a tag to compare

@archid21 archid21 released this 10 Nov 01:06
· 72 commits to main since this release
v0.10.2
5863030
  • Fable 5.2 prices. Fable is now priced as Fable 5.2: $8 input, $40 output, $0.20 cache read, $10 and $16 for 5-minute and 1-hour cache writes (USD per million tokens). The automatic price check reads the Fable 5.2 row.
  • Older models get their own prices. rightsize priced each family at its newest model, and older versions cost more, so its costs and keep-warm and compact choices were wrong there. prices.json now has a versions list with a row for each older version the pricing page lists (for example claude-opus-4-8 at $5 input and $25 output), and the price check keeps it current. A request is priced by its version's row wherever the version sits in the model ID, so Bedrock and Vertex IDs match too. On an older model an effort change writes the whole conversation again, so rightsize prices each switch that way. A main chat on an older version with no row pauses rightsize, as if you turned it off: the band says so once, the status line says why, and /rightsize prices fetches the current list. Switching to a priced or current model turns it back on. Helpers are not checked.
  • The cache's life is read, not assumed. rightsize took the prompt cache's life from prices.json (1 hour unless edited), so on an API key, a cloud provider or a subscription drawing on usage credits, where Claude Code writes a 5-minute cache, keep warm sent its first request at 57 minutes to a cache that had died at 5, and the idle warning waited an hour. It now reads the life the way Claude Code decides it: FORCE_PROMPT_CACHING_5M, CLAUDE_CODE_PROMPT_CACHE_TTL, the promptCacheTtl setting, ENABLE_PROMPT_CACHING_1H, a cacheTtl you put in prices.json, then the billing the rate limits show (1 hour on a subscription within its plan, 5 minutes otherwise; a subscription window at 100% means usage credits). Helpers, Claude's subagents and forks are their own bucket, 5 minutes unless subagentPromptCacheTtl or its variable says 1 hour, and a helper's cache writes are now priced at 1.25x input, not 2x. The life is read at start, when the billing is learned and after each turn, logged when it changes, and shown by /rightsize status. The shipped prices.json no longer carries cacheTtl; one you add still speaks for a gateway rightsize cannot read.
  • Keep warm inside a turn, on a 5-minute cache. A tool call that runs longer than the cache lives (a test run, a wait for CI, a subagent's work, a question left open) let the conversation go cold in the middle of the turn, and the request after it wrote the whole conversation again. When the cache lives under 1 hour, rightsize now sends its keep-warm request 4 minutes after the main chat's last request and every 4 minutes while the call runs. It follows the same bars as keep warm between turns: Cache on, Before the cache goes cold not off, a cold return that costs at least the Idle warning amount, and never more requests than the cold request would cost. It starts from a turn's second request on, not on the first tool call after your prompt and not after you type into a running turn, because there the request would miss the cache. When the call outlasted the cache and the next request read the conversation from it, the saving is counted like any other keep-warm return. Nothing shows on the band; the log and the report's Keep warm line carry it. A 1-hour cache is left alone.
  • A helper's long foreground wait is refused. rightsize cannot keep a helper's (subagent's or fork's) cache warm, so a helper that waits on a foreground Bash call longer than its 5-minute cache lives lets the cache die, and its next request writes its whole context again. A helper's foreground Bash call with a timeout over 270 seconds (4.5 minutes, 30 seconds under the cache's life) is now refused with a hint to run it in the background or use a shorter timeout. A call with no timeout (Claude Code's default is 2 minutes), a background call, a helper on a 1-hour cache (subagentPromptCacheTtl or its variable) and the main chat are left alone; the main chat has in-turn keep warm.
  • The report names the memory files and counts SessionStart hook output. Fixed context's Memory row now names your largest memory files (CLAUDE.md, MEMORY.md, rules files) with their sizes, the way the MCP tools row names servers. A new SessionStart hooks row counts the text that your settings' and plugins' SessionStart hooks add to every new session. It sits in the conversation, so every request reads it again from the cache, but /context shows it in no row of its own. The row gives the total, not the source: Claude Code does not say which plugin wrote it, so look in /plugin. A memory file or the SessionStart hooks of 10,000 tokens or more (about the 40,000 characters at which Claude Code itself warns about a large CLAUDE.md) is flagged with a Large: line. The Memory advice now says to trim CLAUDE.md and MEMORY.md (/memory).
  • An automatic permission denial is not a tool error. In a session with nobody to answer a permission prompt (claude -p, CI), Claude Code denies a call that needs approval by itself. rightsize counted that as the work failing, so a turn it had lowered went back to the session's effort level. It now treats the denial like your own "no" at the prompt: the lowered level stays, and the stuck signs do not count it. The same goes for a write your permission settings deny ("File is in a directory that is denied by your permission settings"). A real failure after it still brings the level back.
  • A lookup that misses a file is not a tool error. Claude often reads around with one line of several lookups and guesses a path that is not there (grep … | head; head CHANGES.rst in a repo that has CHANGES.md). The line ends with an error, and one such miss sent a lowered turn back to the session's effort level. A Bash line made only of read-only lookups (grep, cat, head, ls, sed -n, find, read-only git and the like, with no output written to a file) that failed on "No such file or directory", or that sent its errors to /dev/null and ended with exit code 1 or 2, now counts like a search that found nothing. A grep-style search in a ; list is now judged by the list's last command, whose status the shell returns, not its first.
  • The hand-off brief is smaller and tells the helper when to stop. The hidden note that tells Claude how to brief a cheaper subagent now asks for what is out of scope, and for code as file:line ranges or short excerpts, never whole files pasted in: a smaller brief costs less to cache, and every later helper step reads it again. The note also tells the helper that when it meets a choice the brief does not settle, or something that contradicts the brief, it stops and reports the question with its options instead of guessing, and Claude decides and continues it.
  • Keep warm or compact is priced over the time keep warm would run. Before the cache goes cold, rightsize compares keeping the cache warm over your usual idle time with compacting. It priced the requests over your usual idle time even when keep warm would stop sooner (its hours, or your usual start time), so it could choose a compact that keep warm would never have cost. It now prices the shorter of the two.