Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

mid-conversation-effort-example changedbuild-with-claude/mid-conversation-effort-example

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+12added
Lines−23removed
From line 1,548 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits11to this page, all time

The whole hunk

from line 1548, old and new numbered
/
lines
from line 1548
15481548 "You are one agent in a larger parallel fan-out, assigned a single subtask. "
15491549 + "Investigate it directly, using bash to check facts rather than guessing, and finish "
15501550 + "by calling report_findings exactly once. Return findings, not narration.";
1551 List<MessageParam> messages = [new() { Role = Role.User, Content = prompt }];
1551 List<MessageParam> messages = [new UserMessageParam { Content = prompt }];
15521552 for (var turn = 0; turn < maxSubagentTurns; turn++)
15531553 {
15541554 using var deadline = new CancellationTokenSource(TimeSpan.FromSeconds(requestTimeoutSeconds));
from line 1561
15611561 Tools = [bashTool, reportTool],
15621562 Messages = messages,
15631563 }, cancellationToken: deadline.Token).Aggregate();
1564 messages.Add(new()
1564 messages.Add(new AssistantMessageParam
15651565 {
1566 Role = Role.Assistant,
15671566 Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList(),
15681567 });
15691568 if (response.StopReason == StopReason.PauseTurn)
from line 1603
16041603 {
16051604 return report;
16061605 }
1607 messages.Add(new() { Role = Role.User, Content = toolResults });
1606 messages.Add(new UserMessageParam { Content = toolResults });
16081607 }
16091608 return "(subagent hit the turn limit before finishing)";
16101609 }
from line 1713
17141713 // Subagents inherit the main loop's effort level.
17151714 String runSubagent(Model model, String prompt) throws InterruptedException {
17161715 List<MessageParam> messages = new ArrayList<>();
1717 messages.add(MessageParam.builder().role(MessageParam.Role.USER).content(prompt).build());
1716 messages.add(MessageParam.ofUser(prompt));
17181717 for (int turn = 0; turn < MAX_SUBAGENT_TURNS; turn++) {
17191718 MessageCreateParams params = MessageCreateParams.builder()
17201719 .model(model)
from line 1767
17681767 if (report != null) {
17691768 return report;
17701769 }
1771 messages.add(MessageParam.builder()
1772 .role(MessageParam.Role.USER)
1773 .contentOfBlockParams(toolResults)
1774 .build());
1770 messages.add(MessageParam.ofUserOfContentBlockParams(toolResults));
17751771 }
17761772 return "(subagent hit the turn limit before finishing)";
17771773 }
from line 3201
32053201 modeOn = nextModeOn;
32063202 }
32073203 
3208 MessageParam SystemMessage(string content) => new() { Role = Role.System, Content = content };
3204 MessageParam SystemMessage(string content) => new SystemMessageParam { Content = content };
32093205 
32103206 // System messages owed on this turn: an exit notice, the full mode text on entry,
32113207 // or a one-line refresher every turnsBetweenRefreshers user turns.
from line 3236
32403236 {
32413237 // Mid-conversation system messages follow the user turn they apply to, which keeps
32423238 // the cached prefix ahead of them untouched.
3243 messages.Add(new() { Role = Role.User, Content = userInput });
3239 messages.Add(new UserMessageParam { Content = userInput });
32443240 messages.AddRange(DueSystemMessages());
32453241 turnsSinceReminder++;
32463242 
from line 3252
32563252 Tools = [workflowTool, bashTool],
32573253 Messages = messages,
32583254 }, cancellationToken: deadline.Token).Aggregate();
3259 messages.Add(new()
3255 messages.Add(new AssistantMessageParam
32603256 {
3261 Role = Role.Assistant,
32623257 Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList(),
32633258 });
32643259 
from line 3289
32943289 };
32953290 toolResults.Add(new ToolResultBlockParam(toolUse.ID) { Content = output, IsError = isError });
32963291 }
3297 messages.Add(new() { Role = Role.User, Content = toolResults });
3292 messages.Add(new UserMessageParam { Content = toolResults });
32983293 }
32993294 return "(hit the main loop turn limit before finishing)";
33003295 }
from line 3471
34763471 }
34773472 
34783473 private MessageParam systemMessage(String content) {
3479 return MessageParam.builder()
3480 .role(MessageParam.Role.SYSTEM)
3481 .content(content)
3482 .build();
3474 return MessageParam.ofSystem(content);
34833475 }
34843476 
34853477 // Send one user turn through the loop, executing tool calls until the model stops.
from line 3478
34863478 String turn(String userInput) throws InterruptedException {
34873479 // Mid-conversation system messages follow the user turn they apply to, which keeps
34883480 // the cached prefix ahead of them untouched.
3489 messages.add(MessageParam.builder().role(MessageParam.Role.USER).content(userInput).build());
3481 messages.add(MessageParam.ofUser(userInput));
34903482 messages.addAll(dueSystemMessages());
34913483 turnsSinceReminder++;
34923484 
from line 3533
35413533 .isError(result.isError())
35423534 .build()));
35433535 }
3544 messages.add(MessageParam.builder()
3545 .role(MessageParam.Role.USER)
3546 .contentOfBlockParams(toolResults)
3547 .build());
3536 messages.add(MessageParam.ofUserOfContentBlockParams(toolResults));
35483537 }
35493538 return "(hit the main loop turn limit before finishing)";
35503539 }
Feedback