#1052: Turn.pushText failed the turn at the first "⚠ Agent execution
terminated due to error." anywhere in the reply, so a model quoting it
(inline, in a code block) was cut off and reported as an agy error. agy's
own marker ends the prompt, so the marker is now held, and the turn fails
only when the prompt ends with it still held (Turn.endText, before the
agentError check). Text or a tool call after it sends it on as text.
#1053: when a replay went over the prompt budget mid tool loop,
renderInitialPromptParts kept only the opening message and the newest
history, and dropped the user prompt the loop works on. Now, when the
current turn carries tool_results, the latest user message without one is
kept too if it fits, in order, with an omission note per gap.
Not changed: #1052's retry banners (nothing shows them reaching the
client as message chunks) and #1051 (the supersede rule is deliberate,
covered by A15 and the lineage sibling test; evidence asked for).
Run on WSL (Bun 1.4.2, temp HOME):
- bun test packages/agy-cli: 15 pass, 0 fail.
- test/repeat-batch.mjs: 17 pass, 0 fail (3 new).
- bun scripts/check.mjs agy-cli: ok.
Broken by hand, each 16 pass 1 fail, then restored: the task prompt not
pinned; pushText back to the first-indexOf rule; turn.endText() removed.
Not tried: a real agy (no install, no Google endpoints).
Reported-by: hiee3