From 570de8e17caf8f82431e4acdf1a91cefb78367db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 21:17:49 +0000 Subject: [PATCH 1/2] Initial plan From 209edebbaba449b49ae04a88a01884c6e76d34ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 21:19:01 +0000 Subject: [PATCH 2/2] docs: add patch error loop prevention section to space-widgets SKILL.md Agent-Logs-Url: https://github.com/Eisenh/space-agent/sessions/ac6977a7-9bef-45dc-b9c1-c6ccc114da95 Co-authored-by: Eisenh <10191090+Eisenh@users.noreply.github.com> --- .../mod/_core/spaces/ext/skills/space-widgets/SKILL.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/L0/_all/mod/_core/spaces/ext/skills/space-widgets/SKILL.md b/app/L0/_all/mod/_core/spaces/ext/skills/space-widgets/SKILL.md index c5faf87f..f5d7c30c 100644 --- a/app/L0/_all/mod/_core/spaces/ext/skills/space-widgets/SKILL.md +++ b/app/L0/_all/mod/_core/spaces/ext/skills/space-widgets/SKILL.md @@ -79,6 +79,13 @@ staged turns - After a successful patch or render, the next assistant turn should usually be the final user-facing answer. Do not output another promise line such as Updating... or Applying... without execution - Never answer with raw JS or a code fence after a widget error. Either send a proper execution message or a normal user-facing answer +patch error loop prevention +- After any patchWidget or renderWidget error, call readWidget on that widget before attempting another patch +- Treat source as unseen unless readWidget succeeded in the current turn. Never infer line numbers from memory +- If the same error repeats twice on the same widget, stop and call readWidget before retrying +- If patchWidget fails with a syntax or reference error on a line you did not touch, the existing source is already broken — read first, then use renderWidget for a full rewrite +- Never make more than 2 consecutive patches on the same widget without a readWidget in between + examples Checking widget catalog _____javascript