Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.319 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

compaction-keep-recent-turns changedbuild-with-claude/compaction-keep-recent-turns

Recorded here
Lines+25added
Lines−3removed
From line 13 where the diff opens
First seen 21 Sep 2026 this site's first read of the page
Recorded edits10to this page, all time

## Availability ### API support #### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) ### Required beta headers

The whole hunk

from line 13, old and new numbered
/
lines
from line 13
1313 - claude-mythos-preview
1414 - claude-opus-5-5
1515 - claude-opus-5
16 - claude-sonnet-5-5
17 - claude-sonnet-5
18 - claude-haiku-5-5
1619 - claude-opus-4-8
1720 - claude-opus-4-7
1821 - claude-opus-4-6
19 - claude-sonnet-5-5
20 - claude-sonnet-5
2122 - claude-sonnet-4-6
22 - claude-haiku-5-5
2323 supportedPlatforms:
2424 Claude API: beta
2525 Claude Platform on AWS: beta
from line 500
500500If you send thinking blocks back on a model with [preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking), the thinking in the kept turns stays valid only while the [conditions for kept thinking](https://platform.claude.com/docs/en/build-with-claude/compaction-thinking-blocks#conditions-for-kept-thinking-to-stay-valid) hold, and one of them limits where the cut can fall.
501501 
502502The program’s cut, between a reply and the next `user` message, meets that condition. So does a cut at the end of a request you already made: compact exactly that request’s `messages`, and keep everything your history has gained since.
503 
504## Availability
505 
506Keep-tail compaction is in beta on select models.
507 
508### API support
509 
510#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
511 
512* Availability: Available
513 
514| Status | Cloud platforms | Models |
515| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
516| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview) |
517 
518### Required beta headers
519 
520[Beta headers overview](https://platform.claude.com/docs/en/api/beta-headers)
521 
522Beta headers allow you to access experimental features and new model capabilities before they become part of the standard API.
523 
524* `compact-2026-09-04`
503525 
Feedback