mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #152] bug: Agent fabricates user turns and self-executes tools (runaway) — history flattened into in-band [role] transcript with no turn-boundary stop #78
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#78
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 @penradioGables on GitHub (Jul 17, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/152
Version: cptr 0.9.8 (ghcr.io/open-webui/computer, digest sha256:9a2f8db19636a3426fab3e030a88d967bd2b742df622b0bdd5c00f83d5581f72)
Backend: Claude Code profile (claude-sonnet-4-6) via Open WebUI Chat Completions gateway
(Correction: originally reported as Codex — verified against the actual DB row for this chat; the model field shows
agent:claude-code/claude-sonnet-4-6. The underlying flatten-to-string mechanism is identical in both adapters — seeclaude_code.py:_prompt_from_messagesandcodex.py:_messages_to_promptbelow — so this affects both backends, but this specific incident ran on Claude Code.)Summary
Conversation history is flattened into a single string of `[user]
…
[assistant]
…
(claude_code.py:_prompt_from_messages~L22; same pattern incodex.py:_messages_to_prompt~L212) and sent as ONE turn input. Because prior turns are presented as an in-band transcript and no stop sequence is registered on the[user]delimiter, the model continues the transcript — emitting a fabricated[user]` message and then answering it, including real tool calls that execute.Steps to reproduce
[user]/[assistant]text and a fabricated multi-turn dialogue, and (b) executes tools for the invented request.Expected
The assistant answers only the latest user message; it cannot author user turns.
Actual
One turn produced 26 output items over ~42s vs. ~2 items normally; wrote and ran a file (
hello.py) for a request the user never made.Evidence: task log:
DB row confirms
model=agent:claude-code/claude-sonnet-4-6. Saved assistant content contains `[user]
Hi
[assistant]…` matching the flatten template referenced above.
Suggested fix
Pass structured multi-turn messages to the backend (both the Claude Agent SDK and the Codex app-server protocol accept them) instead of flattening to a string; and/or register the role delimiter as a stop sequence; and/or use the backend's native session continuity instead of replaying a transcript each turn.
@owui-terminator[bot] commented on GitHub (Jul 17, 2026):
⚠️ Missing Issue Title Prefix
@penradioGables, your issue title is missing a categorising prefix (e.g.
bug:,feat:,docs:).Please update the title to lead with one of:
Example:
bug: Login fails when the password contains special characters@owui-terminator[bot] commented on GitHub (Jul 17, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #50 Gateway connection hangs in OpenWebUI
This issue also reports broken behavior when cptr is used through OpenWebUI, including repeated chat-completion calls and the assistant hanging or producing nonsense. It suggests the OpenWebUI integration/prompting path is problematic, which is close to the runaway transcript/tool-use symptom in #152.
by naqerl
🟣 #77 Openweb UI implementation not working properly
This issue is about the OpenWebUI integration not behaving correctly and the assistant returning clearly wrong persona/context, while cptr itself works. It is related as a prior report that the OpenWebUI-backed chat flow is mishandling conversation context.
by thgilciffart
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@tjbck commented on GitHub (Jul 18, 2026):
Should be addressed!
content(image attachment) 500s/v1/chat/completions— list bound to a TEXT column #114