mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[GH-ISSUE #19169] issue: System Prompt Duplication During Agentic Tool Calls Leading to Token Waste and Write-Cache Overprice #34324
Reference in New Issue
Block a user
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 @alexis-dioxycle on GitHub (Nov 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19169
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.26
Ollama Version (if applicable)
No response
Operating System
macOS and Ubuntu 22.04
Browser (if applicable)
Any (issue is server-side)
Confirmation
README.md.Expected Behavior
When a model engages in agentic behavior with multiple sequential tool calls, the system prompt should remain singular and consistent throughout all tool invocations. Each tool call should see the system prompt only once in the messages array.
Actual Behavior
During agentic behavior with multiple tool calls, the system prompt gets duplicated with each subsequent tool call:
This duplication:
Steps to Reproduce
I made a step by step guide that should be easy to follow as it only requires the creation of a model that will return the system prompt, and make it act agentically:
Steps to Reproduce
Prerequisites
Step-by-Step Reproduction
1. Set Up System Prompt
2. Create the System Prompt Inspector Tool
Navigate to Workspace > Tools > + (Create New Tool)
Paste the following complete tool code:
3. Reproduce the Duplication Bug
Test Case A: Sequential Tool Calls (Simple)
4. Verify the Issue
After reproducing, you should observe:
Logs & Screenshots
Here are the screenshots from this very model. I also have the actual logs that I can show.
Here is the logs on the chrome network tab
Additional Information
No response
@silentoplayz commented on GitHub (Nov 14, 2025):
Seems related - https://github.com/open-webui/open-webui/issues/19121
@alexis-dioxycle commented on GitHub (Nov 14, 2025):
The fix in #19122 doesn't fix this issue, as this is concerning the model system prompt directly. We don't have any duplication of the users message or tool instructions
@tjbck commented on GitHub (Nov 17, 2025):
@alexis-dioxycle can you reproduce with the latest?