compaction-thinking-blocks changedbuild-with-claude/compaction-thinking-blocks
Nearest release: v2.1.307, published 4 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+10added
Lines−22removed
From line
252
where the diff opens
First seen
21 Sep 2026
this site's first read of the page
Recorded edits9to this page, all time
The whole hunk
from line 252, old and new numbered
/
from line 252
252252 // 1. Have a short conversation with thinking on.
253253 List<BetaMessageParam> history =
254254 [
255 new() { Role = Role.User, Content = "What are the main entities in the app's data model?" },
255 new BetaUserMessageParam { Content = "What are the main entities in the app's data model?" },
256256 ];
257257 var first = await client.Beta.Messages.Create(new MessageCreateParams
258258 {
from line 265
265265 });
266266 history.AddRange(
267267 [
268 new()
268 new BetaAssistantMessageParam
269269 {
270 Role = Role.Assistant,
271270 Content = first.Content.Select(block => new BetaContentBlockParam(block.Json)).ToList(),
272271 },
273 new()
272 new BetaUserMessageParam
274273 {
275 Role = Role.User,
276274 Content = "Testing starts on Tuesday, March 3, 2026, takes 10 weekdays, and pauses on March 9 and March 16. On which date does it end?",
277275 },
278276 ]);
from line 283
285283 Thinking = thinking,
286284 Messages = history,
287285 });
288 history.Add(new()
286 history.Add(new BetaAssistantMessageParam
289287 {
290 Role = Role.Assistant,
291288 Content = second.Content.Select(block => new BetaContentBlockParam(block.Json)).ToList(),
292289 });
293290 var thinkingBlocks = second.Content.Count(block => block.TryPickThinking(out _));
from line 309
312309 // 3. Put the block in front of the kept turn and ask the next question.
313310 history =
314311 [
315 new()
312 new BetaAssistantMessageParam
316313 {
317 Role = Role.Assistant,
318314 Content = summary.Content.Select(block => new BetaContentBlockParam(block.Json)).ToList(),
319315 },
320316 .. history[2..],
321 new() { Role = Role.User, Content = "Which day should the release go out?" },
317 new BetaUserMessageParam { Content = "Which day should the release go out?" },
322318 ];
323319 var third = await client.Beta.Messages.Create(new MessageCreateParams
324320 {
from line 460
464460
465461 // 1. Have a short conversation with thinking on.
466462 var history = new ArrayList<BetaMessageParam>();
467 history.add(BetaMessageParam.builder()
468 .role(BetaMessageParam.Role.USER)
469 .content("What are the main entities in the app's data model?")
470 .build());
463 history.add(BetaMessageParam.ofUser("What are the main entities in the app's data model?"));
471464 var firstParams = MessageCreateParams.builder()
472465 .model(MODEL)
473466 .maxTokens(8192)
from line 471
478471 .build();
479472 var first = client.beta().messages().create(firstParams);
480473 history.add(first.toParam());
481 history.add(BetaMessageParam.builder()
482 .role(BetaMessageParam.Role.USER)
483 .content("Testing starts on Tuesday, March 3, 2026, takes 10 weekdays, and pauses on March 9 and March 16. On which date does it end?")
484 .build());
474 history.add(BetaMessageParam.ofUser(
475 "Testing starts on Tuesday, March 3, 2026, takes 10 weekdays, and pauses on March 9 and March 16. On which date does it end?"));
485476 var secondParams = MessageCreateParams.builder()
486477 .model(MODEL)
487478 .maxTokens(8192)
from line 505
514505 // 3. Put the block in front of the kept turn and ask the next question.
515506 firstTurn.clear();
516507 history.addFirst(summary.toParam());
517 history.add(BetaMessageParam.builder()
518 .role(BetaMessageParam.Role.USER)
519 .content("Which day should the release go out?")
520 .build());
508 history.add(BetaMessageParam.ofUser("Which day should the release go out?"));
521509 var thirdParams = MessageCreateParams.builder()
522510 .model(MODEL)
523511 .maxTokens(8192)
No line in this hunk matches that.