Steer a turn instead of waiting it out Queueing put a message at the end of the turn. That is not steering: by the time the model reads it, the work the reader wanted to redirect is already done. Codex drains a pending-input queue at the top of each iteration of its turn loop, so a message submitted while the model runs is read at the next step rather than at the end. Our tool loop has the same shape — a turn is a loop of model calls, and between two of them is a place another message can join without stopping anything — so it does the same now. `ReplySource` gains an optional `steer`. Both lanes take one: the message is held until the top of the next round and then pushed onto the transcript as an ordinary user turn, because that is what it is. A source that cannot take one returns false and the session holds it to the end of the turn as before, so nothing is dropped either way. The interface says which happened — "Steering: the model reads this at its next step" against "Queued" — because they are different promises and a reader deciding whether to also press escape needs to know which one they got. The test asserts the message reaches a later round and not the first, and that the turn is still running when it is accepted. It fails when the drain is removed. 396 tests pass.
Steer a turn instead of waiting it out
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
docs/assure-repo/false-green-candidates.v1.json -
modified
docs/assure-repo/surface-inventory.v1.json -
modified
packages/openagents-cli/src/coder-ollama.ts -
modified
packages/openagents-cli/src/coder-session.ts -
modified
packages/openagents-cli/src/coder-thread.ts -
added
packages/openagents-cli/test/coder-steer.test.ts
Diff
6 files changed, +121 -3
docs/assure-repo/false-green-candidates.v1.json modified +1 -1
@@ -4,7 +4,7 @@
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 |
|
|
| 7 |
|
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 | 10 |
|
docs/assure-repo/surface-inventory.v1.json modified +2 -2
@@ -1,7 +1,7 @@
| 1 | 1 |
|
| 2 | 2 |
|
| 3 | 3 |
|
| 4 |
|
|
| 4 |
|
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 | 7 |
|
packages/openagents-cli/src/coder-ollama.ts modified +20
@@ -146,6 +146,13 @@ export class OllamaReplySource implements ReplySource {
| 146 | 146 |
|
| 147 | 147 |
|
| 148 | 148 |
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 149 | 156 |
|
| 150 | 157 |
|
| 151 | 158 |
|
@@ -216,6 +223,12 @@ export class OllamaReplySource implements ReplySource {
| 216 | 223 |
|
| 217 | 224 |
|
| 218 | 225 |
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 219 | 232 |
|
| 220 | 233 |
|
| 221 | 234 |
|
@@ -251,6 +264,13 @@ export class OllamaReplySource implements ReplySource {
| 251 | 264 |
|
| 252 | 265 |
|
| 253 | 266 |
|
| 267 |
|
|
| 268 |
|
|
| 269 |
|
|
| 270 |
|
|
| 271 |
|
|
| 272 |
|
|
| 273 |
|
|
| 254 | 274 |
|
| 255 | 275 |
|
| 256 | 276 |
|
packages/openagents-cli/src/coder-session.ts modified +22
@@ -196,6 +196,18 @@ export interface ReplySource {
| 196 | 196 |
|
| 197 | 197 |
|
| 198 | 198 |
|
| 199 |
|
|
| 200 |
|
|
| 201 |
|
|
| 202 |
|
|
| 203 |
|
|
| 204 |
|
|
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 208 |
|
|
| 209 |
|
|
| 210 |
|
|
| 199 | 211 |
|
| 200 | 212 |
|
| 201 | 213 |
|
@@ -505,6 +517,16 @@ export class CoderSession {
| 505 | 517 |
|
| 506 | 518 |
|
| 507 | 519 |
|
| 520 |
|
|
| 521 |
|
|
| 522 |
|
|
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
|
|
| 527 |
|
|
| 528 |
|
|
| 529 |
|
|
| 508 | 530 |
|
| 509 | 531 |
|
| 510 | 532 |
|
packages/openagents-cli/src/coder-thread.ts modified +19
@@ -228,6 +228,13 @@ export class ThreadReplySource implements ReplySource {
| 228 | 228 |
|
| 229 | 229 |
|
| 230 | 230 |
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 231 | 238 |
|
| 232 | 239 |
|
| 233 | 240 |
|
@@ -313,6 +320,12 @@ export class ThreadReplySource implements ReplySource {
| 313 | 320 |
|
| 314 | 321 |
|
| 315 | 322 |
|
| 323 |
|
|
| 324 |
|
|
| 325 |
|
|
| 326 |
|
|
| 327 |
|
|
| 328 |
|
|
| 316 | 329 |
|
| 317 | 330 |
|
| 318 | 331 |
|
@@ -321,6 +334,12 @@ export class ThreadReplySource implements ReplySource {
| 321 | 334 |
|
| 322 | 335 |
|
| 323 | 336 |
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 324 | 343 |
|
| 325 | 344 |
|
| 326 | 345 |
|
packages/openagents-cli/test/coder-steer.test.ts added +57
@@ -0,0 +1,57 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|