Let a reader steer a running turn Enter did nothing while a turn was running. Not queued, not refused with a reason — the key was dropped. So `/export` was impossible mid-turn, and there was no way to say anything to a model that had gone the wrong way except to stop it. Enter now always submits, and the session decides. An interface command runs at once, because none of them go to the model. Anything else is queued: its entry goes on the transcript immediately, so a reader sees what they said when they said it, and it is sent when the turn ends. The session says it was queued and how to send it sooner. Two tests encoded the old decision — "refuses a second prompt rather than queueing it" — and are rewritten rather than deleted, because the decision they recorded is the one being reversed. Escape now says it interrupted. Stopping the stream and saying nothing leaves a reader looking at a settled reply with no way to tell whether the key worked, which reads as the key not working. And `fetch failed` is no longer the whole of a failure. Node puts what actually happened in `cause` and reports the top of the chain, so a turn that lost the local server showed two words. The chain is unwound now, and the Ollama source names the host and the model it could not reach and says the conversation is kept. It stays neutral about the reason, because a refused connection and a model that does not exist arrive the same way and one of them is not the server being down. 393 tests pass.
Let a reader steer a running turn
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/src/coder-session.ts -
modified
packages/openagents-cli/src/coder-ui.ts -
modified
packages/openagents-cli/test/coder-session.test.ts -
modified
packages/openagents-cli/test/coder-ui.test.ts
Diff
5 files changed, +225 -14
packages/openagents-cli/src/coder-ollama.ts modified +27 -1
@@ -142,6 +142,7 @@ const systemPrompt = (tools: ReadonlyArray<CoderTool>): string => {
| 142 | 142 |
|
| 143 | 143 |
|
| 144 | 144 |
|
| 145 |
|
|
| 145 | 146 |
|
| 146 | 147 |
|
| 147 | 148 |
|
@@ -162,7 +163,8 @@ export class OllamaReplySource implements ReplySource {
| 162 | 163 |
|
| 163 | 164 |
|
| 164 | 165 |
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 166 | 168 |
|
| 167 | 169 |
|
| 168 | 170 |
|
@@ -206,7 +208,31 @@ export class OllamaReplySource implements ReplySource {
| 206 | 208 |
|
| 207 | 209 |
|
| 208 | 210 |
|
| 211 |
|
|
| 212 |
|
|
| 213 |
|
|
| 214 |
|
|
| 215 |
|
|
| 216 |
|
|
| 217 |
|
|
| 218 |
|
|
| 209 | 219 |
|
| 220 |
|
|
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 210 | 236 |
|
| 211 | 237 |
|
| 212 | 238 |
|
packages/openagents-cli/src/coder-session.ts modified +60 -2
@@ -67,6 +67,29 @@ export interface CoderToolCall {
| 67 | 67 |
|
| 68 | 68 |
|
| 69 | 69 |
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 70 | 93 |
|
| 71 | 94 |
|
| 72 | 95 |
|
@@ -303,6 +326,13 @@ export class CoderSession {
| 303 | 326 |
|
| 304 | 327 |
|
| 305 | 328 |
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
|
| 306 | 336 |
|
| 307 | 337 |
|
| 308 | 338 |
|
@@ -470,9 +500,32 @@ export class CoderSession {
| 470 | 500 |
|
| 471 | 501 |
|
| 472 | 502 |
|
| 473 |
|
|
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| 507 |
|
|
| 508 |
|
|
| 509 |
|
|
| 510 |
|
|
| 511 |
|
|
| 512 |
|
|
| 513 |
|
|
| 514 |
|
|
| 515 |
|
|
| 516 |
|
|
| 474 | 517 |
|
| 475 | 518 |
|
| 519 |
|
|
| 520 |
|
|
| 521 |
|
|
| 522 |
|
|
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
|
|
| 527 |
|
|
| 528 |
|
|
| 476 | 529 |
|
| 477 | 530 |
|
| 478 | 531 |
|
@@ -576,7 +629,7 @@ export class CoderSession {
| 576 | 629 |
|
| 577 | 630 |
|
| 578 | 631 |
|
| 579 |
|
|
| 632 |
|
|
| 580 | 633 |
|
| 581 | 634 |
|
| 582 | 635 |
|
@@ -592,6 +645,11 @@ export class CoderSession {
| 592 | 645 |
|
| 593 | 646 |
|
| 594 | 647 |
|
| 648 |
|
|
| 649 |
|
|
| 650 |
|
|
| 651 |
|
|
| 652 |
|
|
| 595 | 653 |
|
| 596 | 654 |
|
| 597 | 655 |
|
packages/openagents-cli/src/coder-ui.ts modified +12 -5
@@ -737,7 +737,11 @@ export function runCoderUi(session: CoderSession, options: CoderUiOptions): Prom
| 737 | 737 |
|
| 738 | 738 |
|
| 739 | 739 |
|
| 740 |
|
|
| 740 |
|
|
| 741 |
|
|
| 742 |
|
|
| 743 |
|
|
| 744 |
|
|
| 741 | 745 |
|
| 742 | 746 |
|
| 743 | 747 |
|
@@ -845,10 +849,13 @@ export function runCoderUi(session: CoderSession, options: CoderUiOptions): Prom
| 845 | 849 |
|
| 846 | 850 |
|
| 847 | 851 |
|
| 848 |
|
|
| 849 |
|
|
| 850 |
|
|
| 851 |
|
|
| 852 |
|
|
| 853 |
|
|
| 854 |
|
|
| 855 |
|
|
| 856 |
|
|
| 857 |
|
|
| 858 |
|
|
| 852 | 859 |
|
| 853 | 860 |
|
| 854 | 861 |
|
packages/openagents-cli/test/coder-session.test.ts modified +40 -6
@@ -71,17 +71,47 @@ describe("CoderSession", () => {
| 71 | 71 |
|
| 72 | 72 |
|
| 73 | 73 |
|
| 74 |
|
|
| 75 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 76 | 86 |
|
| 77 | 87 |
|
| 78 | 88 |
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 79 | 95 |
|
| 80 | 96 |
|
| 81 | 97 |
|
| 82 | 98 |
|
| 83 | 99 |
|
| 84 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 85 | 115 |
|
| 86 | 116 |
|
| 87 | 117 |
|
@@ -213,15 +243,19 @@ describe("CoderSession", () => {
| 213 | 243 |
|
| 214 | 244 |
|
| 215 | 245 |
|
| 216 |
|
|
| 217 |
|
|
| 246 |
|
|
| 247 |
|
|
| 218 | 248 |
|
| 219 | 249 |
|
| 220 | 250 |
|
| 221 | 251 |
|
| 222 | 252 |
|
| 223 |
|
|
| 253 |
|
|
| 224 | 254 |
|
| 255 |
|
|
| 256 |
|
|
| 257 |
|
|
| 258 |
|
|
| 225 | 259 |
|
| 226 | 260 |
|
| 227 | 261 |
|
packages/openagents-cli/test/coder-ui.test.ts modified +86
@@ -604,3 +604,89 @@ describe("the /reload command", () => {
| 604 | 604 |
|
| 605 | 605 |
|
| 606 | 606 |
|
| 607 |
|
|
| 608 |
|
|
| 609 |
|
|
| 610 |
|
|
| 611 |
|
|
| 612 |
|
|
| 613 |
|
|
| 614 |
|
|
| 615 |
|
|
| 616 |
|
|
| 617 |
|
|
| 618 |
|
|
| 619 |
|
|
| 620 |
|
|
| 621 |
|
|
| 622 |
|
|
| 623 |
|
|
| 624 |
|
|
| 625 |
|
|
| 626 |
|
|
| 627 |
|
|
| 628 |
|
|
| 629 |
|
|
| 630 |
|
|
| 631 |
|
|
| 632 |
|
|
| 633 |
|
|
| 634 |
|
|
| 635 |
|
|
| 636 |
|
|
| 637 |
|
|
| 638 |
|
|
| 639 |
|
|
| 640 |
|
|
| 641 |
|
|
| 642 |
|
|
| 643 |
|
|
| 644 |
|
|
| 645 |
|
|
| 646 |
|
|
| 647 |
|
|
| 648 |
|
|
| 649 |
|
|
| 650 |
|
|
| 651 |
|
|
| 652 |
|
|
| 653 |
|
|
| 654 |
|
|
| 655 |
|
|
| 656 |
|
|
| 657 |
|
|
| 658 |
|
|
| 659 |
|
|
| 660 |
|
|
| 661 |
|
|
| 662 |
|
|
| 663 |
|
|
| 664 |
|
|
| 665 |
|
|
| 666 |
|
|
| 667 |
|
|
| 668 |
|
|
| 669 |
|
|
| 670 |
|
|
| 671 |
|
|
| 672 |
|
|
| 673 |
|
|
| 674 |
|
|
| 675 |
|
|
| 676 |
|
|
| 677 |
|
|
| 678 |
|
|
| 679 |
|
|
| 680 |
|
|
| 681 |
|
|
| 682 |
|
|
| 683 |
|
|
| 684 |
|
|
| 685 |
|
|
| 686 |
|
|
| 687 |
|
|
| 688 |
|
|
| 689 |
|
|
| 690 |
|
|
| 691 |
|
|
| 692 |
|