Sometimes, inside the edit agent, Sonnet thinks that it's doing a tool call and closes its response with `</parameter></invoke>` instead of properly closing </new_text>. A better but more labor-intensive way of fixing this would be switching to streaming tool calls for LLMs that support it. Closes #39921 Release Notes: - Fixed Sonnet's regression with inserting `</parameter></invoke>` sometimes