[GH-ISSUE #8516] [Issue]: Tool editor rejects valid tools with -> in their text after reopening #8386

Closed
opened 2026-11-07 16:42:38 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8516

Originally assigned to: @SpicyMarinara on GitHub.

Summary

After saving and reopening a custom script tool whose description contains ->, changing any setting and saving triggers a validation error even though the tool name is valid. The tool becomes unsaveable through the editor after its first load.

Expected behavior

The editor should round-trip tool text without re-escaping it, or validate the unescaped value. If validation fails, the error should identify the actual offending field.

Actual behavior

Saving after reopening the tool produces Tool name must be lowercase snake_case, despite the name already being valid. The report observes that the editor validates escaped text before unescaping it.

Steps to reproduce

  1. Create a custom script tool with -> in its description, such as punch -> physical_strength.
  2. Save the tool, then reopen it in the editor.
  3. Toggle a setting such as Include hidden context and click Save.
  4. Observe the validation error about the tool name.

Environment

  • Marinara Engine version: v2.5.1 staging
  • Install type: Not provided
  • OS + version: Android; version not provided
  • Browser or app shell: Brave

Logs, screenshots, or video

Validation error: Tool name must be lowercase snake_case. No logs or attachments provided.

Additional context

The report says the stored database row has a valid snake_case name and preserves the description text, while a sibling tool without -> saves successfully. The reported workaround is editing stored data directly, which users cannot access.

Discord thread: problems in the Tool editor
Discord thread link: https://discord.com/channels/1417099416812392641/1565694953223487518
Requested by: gunterlie (gunterlie, Discord ID 282074442962829312)

Discord thread transcript (2 messages)
[2026-10-30T11:52:46.054Z] Patrick1987: Tool editor: saving a tool whose text contains -> fails with a bogus "Tool name must be lowercase snake_case" error

Repro
Create a custom script tool whose description contains -> (e.g. punch -> physical_strength).
Save it once (works).
Reopen it in the editor, toggle anything (e.g. Include hidden context), hit Save.
→ Validation Error: Tool name must be lowercase snake_case. The name is already valid snake_case.

Cause (observed)
The DB row is clean: name is valid snake_case, and the description keeps ->/accents/quotes intact. But the editor HTML-escapes on load (-> → ->, & → &, => → =>) and on save validates the escaped text before unescaping it, so the validator fails and blames the name. A sibling tool with no -> saves fine.

Expected
Round-trip without re-escaping, or validate the unescaped value. At minimum, the error should name the real offending field.

Impact
Any script tool whose text uses -> becomes unsaveable through the UI after the first load; the only fix is editing the stored data directly, which users can't reach.

Marinara v2.5.1 staging · Brave on Android · 127.0.0.1:7860
[Discord message: https://discord.com/channels/1417099416812392641/1565694953223487518/1565694953223487518]

[2026-10-30T11:52:46.884Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1565694953223487518/1565694956704628856]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8516 Originally assigned to: @SpicyMarinara on GitHub. ## Summary After saving and reopening a custom script tool whose description contains `->`, changing any setting and saving triggers a validation error even though the tool name is valid. The tool becomes unsaveable through the editor after its first load. ## Expected behavior The editor should round-trip tool text without re-escaping it, or validate the unescaped value. If validation fails, the error should identify the actual offending field. ## Actual behavior Saving after reopening the tool produces `Tool name must be lowercase snake_case`, despite the name already being valid. The report observes that the editor validates escaped text before unescaping it. ## Steps to reproduce 1. Create a custom script tool with `->` in its description, such as `punch -> physical_strength`. 2. Save the tool, then reopen it in the editor. 3. Toggle a setting such as `Include hidden context` and click Save. 4. Observe the validation error about the tool name. ## Environment - Marinara Engine version: v2.5.1 staging - Install type: Not provided - OS + version: Android; version not provided - Browser or app shell: Brave ## Logs, screenshots, or video Validation error: `Tool name must be lowercase snake_case`. No logs or attachments provided. ## Additional context The report says the stored database row has a valid snake_case name and preserves the description text, while a sibling tool without `->` saves successfully. The reported workaround is editing stored data directly, which users cannot access. Discord thread: problems in the Tool editor Discord thread link: https://discord.com/channels/1417099416812392641/1565694953223487518 Requested by: gunterlie (gunterlie, Discord ID 282074442962829312) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-10-30T11:52:46.054Z] Patrick1987: Tool editor: saving a tool whose text contains -> fails with a bogus "Tool name must be lowercase snake_case" error Repro Create a custom script tool whose description contains -> (e.g. punch -> physical_strength). Save it once (works). Reopen it in the editor, toggle anything (e.g. Include hidden context), hit Save. → Validation Error: Tool name must be lowercase snake_case. The name is already valid snake_case. Cause (observed) The DB row is clean: name is valid snake_case, and the description keeps ->/accents/quotes intact. But the editor HTML-escapes on load (-> → ->, & → &, => → =>) and on save validates the escaped text before unescaping it, so the validator fails and blames the name. A sibling tool with no -> saves fine. Expected Round-trip without re-escaping, or validate the unescaped value. At minimum, the error should name the real offending field. Impact Any script tool whose text uses -> becomes unsaveable through the UI after the first load; the only fix is editing the stored data directly, which users can't reach. Marinara v2.5.1 staging · Brave on Android · 127.0.0.1:7860 [Discord message: https://discord.com/channels/1417099416812392641/1565694953223487518/1565694953223487518] [2026-10-30T11:52:46.884Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1565694953223487518/1565694956704628856] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:42:38 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 30, 2026):

Taking this one: @SpicyMarinara (worked on by Claude). A PR against staging will follow.

<!-- gh-comment-id:6535818526 --> @SpicyMarinara commented on GitHub (Oct 30, 2026): Taking this one: @SpicyMarinara (worked on by Claude). A PR against `staging` will follow.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8386
No description provided.