Keep a turn's reasoning on the transcript it sends back The transcript carried what the model said and dropped what it thought, and an earlier note called that a saving. It is not. A model that cannot see how it reached its last answer reasons its way there again, and a transcript missing the reasoning is not the turn that happened — it is a summary of the turn with the working removed. The assembled reasoning now travels with the assistant message, which the client's own `Message` type already carries as `thinking`. Only the deltas are discarded, and only because they are how the text arrived rather than what it is: a turn keeps its reasoning, not the fragments it streamed in. What this costs is real and is the reader's to weigh, not this layer's to decide by omission. Whether a long history should later be condensed is a separate question from whether it should be recorded, and recording it is what makes the other question answerable. 424 tests pass.
Keep a turn's reasoning on the transcript it sends back
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
packages/openagents-cli/src/coder-ollama.ts -
modified
packages/openagents-cli/test/coder-ollama.test.ts
Diff
2 files changed, +56 -2
packages/openagents-cli/src/coder-ollama.ts modified +9 -2
@@ -403,6 +403,7 @@ export class OllamaReplySource implements ReplySource {
| 403 | 403 |
|
| 404 | 404 |
|
| 405 | 405 |
|
| 406 |
|
|
| 406 | 407 |
|
| 407 | 408 |
|
| 408 | 409 |
|
@@ -451,6 +452,7 @@ export class OllamaReplySource implements ReplySource {
| 451 | 452 |
|
| 452 | 453 |
|
| 453 | 454 |
|
| 455 |
|
|
| 454 | 456 |
|
| 455 | 457 |
|
| 456 | 458 |
|
@@ -481,11 +483,16 @@ export class OllamaReplySource implements ReplySource {
| 481 | 483 |
|
| 482 | 484 |
|
| 483 | 485 |
|
| 484 |
|
|
| 485 |
|
|
| 486 |
|
|
| 487 |
|
|
| 488 |
|
|
| 489 |
|
|
| 490 |
|
|
| 491 |
|
|
| 486 | 492 |
|
| 487 | 493 |
|
| 488 | 494 |
|
| 495 |
|
|
| 489 | 496 |
|
| 490 | 497 |
|
| 491 | 498 |
|
packages/openagents-cli/test/coder-ollama.test.ts modified +47
@@ -135,6 +135,53 @@ describe("an ollama turn that calls a tool", () => {
| 135 | 135 |
|
| 136 | 136 |
|
| 137 | 137 |
|
| 138 |
|
|
| 139 |
|
|
| 140 |
|
|
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 138 | 185 |
|
| 139 | 186 |
|
| 140 | 187 |
|