Skip to content

claude-code

Claude Code 2.1.286 stops resume from losing your turns

Claude News

If Claude Code crashed or was killed right after Claude fired off several tool calls at once, resuming that session could bring it back with every later turn gone. The 2.1.286 release notes on GitHub fix that, along with a spend meter that had been underpricing hour-long prompt cache writes.

At a glance

  • Most of the 2.1.286 notes are fixes, from API 400 errors after non-text tool or hook results to cloud sessions with very large histories that never woke up.
  • The Claude apps gateway's spend meter had priced 1-hour prompt cache writes at the 5-minute rate and counted only the first model call's input tokens on streamed turns using server-side tools.
  • When a fallback model takes over, the context window can drop from 1M to 200K tokens, and the fallback notice and the autocompact-thrashing error now say so explicitly.

If you haven't been following along, Claude Code ships releases often enough that each changelog is a long read. According to Claudeupdates, 2.1.286 contains 88 changes, and its tracker counts 408+ releases since the v0.2.21 beta. Claude Code Docs dates these notes September 30, 2026, on the official changelog.

Resume keeps every turn after a batch of parallel tool calls

The headline fix is in claude --resume and --continue. If an earlier session crashed or was killed after Claude ran a batch of parallel tool calls, resuming it could sometimes lose every turn after the batch. A related bug caused API 400 errors whenever a tool or hook returned an object, number or boolean instead of text, and it hit resumed sessions too.

Two other fixes cover sessions that never came back at all. Cloud sessions with very large histories never woke up, because the container was stopped while the transcript was still loading. A Remote Control message that arrived while Claude Code was exiting was marked delivered and then never answered. It now stays queued for the session's next run.

The gateway's spend meter priced 1-hour cache writes at the 5-minute rate

The Claude apps gateway has a spend meter, and it was wrong in two ways. It priced 1-hour prompt cache writes at the cheaper 5-minute rate. On streamed turns that run a server-side tool such as web search, it counted only the first model call's input tokens.

Prompt caching lets the API reuse the long, unchanged start of a prompt instead of processing it again. According to a breakdown by Romain Lespinasse, a 5-minute write costs 1.25x the base input price, a 1-hour write costs 2x, and a cache read costs 0.1x no matter which tier wrote the cache.

Lespinasse's per-million-token example for Opus 4.7 puts base input at $5.00, a 5-minute write at $6.25, a 1-hour write at $10.00 and a read at $0.50. For Sonnet 4.6 the same breakdown lists $3.00 base, $3.75 for a 5-minute write and $6.00 for a 1-hour write.

Think of a coat check where the longer ticket costs more up front but pickup costs the same either way. Lespinasse notes that the 5-minute tier's 25% premium is recovered after one read, while the 1-hour tier's 100% premium needs two reads.

Fallback notices now say when the context window drops from 1M to 200K tokens

Several changes cover what happens when the model you asked for isn't available. If the Anthropic API refused the model your default or a model alias resolves to, every turn used to fail. Claude Code now retries once on the previous model of the same tier.

Refusal and --fallback-model retries used to fail when the fallback model couldn't run fast. They now run at standard speed, with a one-time notice in interactive sessions. The fallback notice and the autocompact-thrashing error also say when a fallback dropped the context window from 1M to 200K tokens.

Retries in general have a new ceiling too. One limit now covers a whole model call, so with the default retry settings a failing call sends at most 14 requests in total.

Stacked permission requests now show a count such as "2 of 5"

When several permission requests pile up, the prompt now shows your place in the queue, for example "2 of 5". Fetch, skill, file read and several other prompts now match the look of file edit prompts, and Bash, PowerShell and Monitor prompts show the command between dashed lines.

If you type /compact, /clear or /rewind while viewing a background agent's or teammate's transcript, a dialog now names the target and asks first. Before, the command silently acted on the main conversation.

Secret redaction got several fixes. MCP error messages showed a credential's value when "Bearer" or "Basic" came before its key name, and percent-encoded Bearer tokens were only partly masked. Secrets whose key name had an invisible character inside, such as a zero-width space, still showed up in redacted logs and transcripts.

Logs and transcripts could also show part of a URL password that contained punctuation such as quotes, ], &, ) or a second @. The session transcript in the zip that /feedback saves could contain invalid JSON lines after redaction, and that is fixed as well.

The notes describe the two meter bugs but not how far they reached. They don't say how long the gateway underpriced cache writes, or whether spend figures it already reported will be corrected. Oddly, that is the one detail missing from a fix about money, and teams that relied on 1-hour caching or web search through the gateway likely saw readings below their real spend.

What gateway builders check next

If you run your own Claude apps gateway, the page it serves at /protocol is the reference to check after upgrading. As of 2.1.286, it says not to reject unknown input and matches what Claude Code sends today. The notes give no date for the next release, and they don't say how often that protocol page will change as Claude Code changes.

Related stories

  1. Claude Code 2.1.285 lets admins lock down API providers
  2. Claude Code writes the eval, grader included
  3. Without CLAUDE.md, Claude Code 2.1.277 reads AGENTS.md
  4. Claude Code tags gateway requests by class and agent
  5. Claude Code 2.1.269 grades plugins with a scored eval run
  6. Claude Code 2.1.268 makes /cost match gateway rates

Comments

No comments yet. Be the first.

Join the conversation

Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.

We only use your name and avatar from Google. We never store your email address.