{"version":"2.1.292","anchor":"compaction-requests-pass-an-api-attempt-budget-and-fall-back","canonical_anchor":"compaction-requests-pass-an-api-attempt-budget-and-fall-back","heading":"Compaction retries get an attempt budget and a new fallback model, plus rewind and retry tweaks","tier":"notice","area":"Compaction","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.292\/e\/compaction-requests-pass-an-api-attempt-budget-and-fall-back","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.292","markdown":"### Compaction retries get an attempt budget and a new fallback model, plus rewind and retry tweaks\n\nCompaction requests now carry a retry budget and fall back from the compaction model; more API errors count as retryable and rewind gains an expired reason\n\n**What**\n\nCompaction is when Claude Code shortens a long conversation by replacing older parts with a summary so it fits in the model's memory. Several changes affect how compaction and rewind (going back to an earlier point in a conversation) behave when something goes wrong:\n\n- Compaction requests now pass `apiAttemptsLeft`, taken from `compactionApiAttemptsLeft`, so a compaction request carries a budget of how many more times it may try calling the API.\n\n- The backup model a compaction request falls back to (its `fallbackModel`) is now worked out from the model the compaction itself uses (`h.model ?? s.options.mainLoopModel`), instead of always being based on the main conversation model.\n\n- The check that decides whether an API error is worth retrying now also treats HTTP 422 responses, and some error messages mentioning `cache_control` or a beta header, as retryable. Before, it only matched status 400.\n\n- The list of reasons a rewind can fail gains an `expired` reason, and a rewind result can now carry `isolation_latch`.\n\n**Why**\n\nThese change what happens in edge cases: how many times compaction retries after an API error, which model it falls back to, which errors are retried rather than shown as failures, and how a rewind that cannot complete is reported.\n\n- Area: Compaction\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}