mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #418] [Issue]: Script-type custom tools silently saved with enabled:"false" when CUSTOM_TOOL_SCRIPT_ENABLED is unset, vanish from agent picker #176
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cha1latte on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/418
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Script-type custom tools silently persist with
enabled:"false"whenCUSTOM_TOOL_SCRIPT_ENABLEDis unset or false in.env, causing them to disappear from the agent tool picker with no UI feedback. The Script execution-type button remains fully interactive in the tool editor regardless, so users can build and "save" tools that can never be selected. Original discord thread.Expected behavior
Either:
CUSTOM_TOOL_SCRIPT_ENABLEDis not true (mirroring how other gated v1.5.7 flows behave), orCUSTOM_TOOL_SCRIPT_ENABLED=truein your.envto enable") instead of silently writing the record withenabled:"false".Either way, the user should not be able to reach a state where a tool exists in storage but is invisible to agents with zero feedback explaining why.
Actual behavior
With
CUSTOM_TOOL_SCRIPT_ENABLEDunset (the default once a.envfile exists), creating or updating any script-type custom tool persists it withenabled:"false". The tool still appears in the Custom Tools list and editor, but is filtered out of the agent tool picker. Static and webhook tools are unaffected. There is no toast, error banner, terminal log (even with debug mode on), or browser console message indicating the tool was saved in a disabled state. Restarting the server does not surface it. Pre-existing script tools created before v1.5.7 work until they are edited, at which point the save path flips them toenabled:"false"and they vanish too.Steps to reproduce
.envfile (required forADMIN_SECRETto edit script tools at all) without settingCUSTOM_TOOL_SCRIPT_ENABLED=true.test_tool, give it any parameter, set Execution Type to Script, and use a trivial body likereturn {result: "test result"};. Save.enabledfield is"false". Manually editing it to"true"and reloading the server makes the tool appear in the agent picker.Environment
84498fd)Logs, screenshots, or video
Screenshots attached showing:
test_tool.return {result: "test result"};) → no longer present in the agent picker.Persisted tool record after saving as Script (secrets stripped):
No relevant output appears in the terminal (with debug mode enabled) or in the browser DevTools console at any point during create / save / agent-picker open.
Additional context
Root cause traced to the
CUSTOM_TOOL_SCRIPT_ENABLEDenv variable introduced in the v1.5.7 security hardening. The flag is documented in the example.envand mentioned in the release notes alongsideUPDATES_APPLY_ENABLEDandSIDECAR_RUNTIME_INSTALL_ENABLED, but it isn't surfaced anywhere in the UI or in the docs reachable by a user who isn't already troubleshooting. SettingCUSTOM_TOOL_SCRIPT_ENABLED=truein.envand restarting fixes new tool creation; previously-saved tools still need their persistedenabledfield corrected manually (or to be re-saved after the flag is set, depending on which path is taken).Workaround: add
CUSTOM_TOOL_SCRIPT_ENABLED=trueto.env, restart, and re-save any affected tools (or hand-edit theenabledfield on existing records, with a backup first).The two distinct UX problems this issue covers — both worth addressing even if the env-gating itself is intentional — are:
enabled:"false"with no user-facing signal.Original Discord thread with full triage: https://discord.com/channels/1417099416812392641/1500923979299291247
Template check
@SpicyMarinara commented on GitHub (May 5, 2026):
Fixed.