From aca2ab9b3676ea8073e846a410d8b65d42b57e90 Mon Sep 17 00:00:00 2001 From: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:48:27 -0500 Subject: [PATCH] fix(fetch-page): drop unclosed script and template blocks from --text (#764) A page cut off inside a script, or a template payload, was printed into the agent context by the retry's --text output. Co-authored-by: Cursor Co-authored-by: Mads Lorentzen Co-authored-by: Claude Fable 5.1 --- tests/test_fetch_page.py | 37 +++++++++++++++++++++++++++++++++++++ tools/fetch_page.py | 22 ++++++++++++++++------ 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/tests/test_fetch_page.py b/tests/test_fetch_page.py index 16ce51ad..af8e8055 100644 --- a/tests/test_fetch_page.py +++ b/tests/test_fetch_page.py @@ -88,6 +88,15 @@ class _Handler(http.server.BaseHTTPRequestHandler): elif self.path == "/forbidden": body = b"denied" self.send_response(403) + elif self.path == "/open-script.html": + body = ( + b"

Visible role