[GH-ISSUE #250] bug: create_artifact fails with TypeError on queued/resumed tool-call replay paths #164

Open
opened 2026-10-18 14:03:30 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @1-kabir on GitHub (Sep 5, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/250

bug: create_artifact fails with TypeError on queued/resumed tool-call replay paths

Bug description

When a create_artifact tool call is replayed from the queue (queued tool
calls and resumed tasks), the call fails and no artifact is created.

To Reproduce

  1. Have the agent queue a create_artifact tool call (or resume a task with a pending create_artifact call).
  2. When the queued call is replayed, the tool errors instead of creating the artifact.

Actual behavior

The replay paths invoke create_artifact(**args, workspace=workspace), but
create_artifact does not declare a workspace parameter — it receives the
workspace via __context__, like every other tool. So every replayed
create_artifact call raises:

TypeError: create_artifact() got an unexpected keyword argument 'workspace'

Expected behavior

Queued/replayed create_artifact calls should succeed. The call should inject
__context__ (including call_id) the same way execute_tool does for all
other tools on the same paths, e.g.:

result = await create_artifact(
    **args, __context__={**tool_ctx, "call_id": item["call_id"]}
)

Affected sites are in run_chat_task in cptr/utils/chat_task.py.

Environment

  • Latest main

Originally created by @1-kabir on GitHub (Sep 5, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/250 bug: `create_artifact` fails with TypeError on queued/resumed tool-call replay paths ### Bug description When a `create_artifact` tool call is replayed from the queue (queued tool calls and resumed tasks), the call fails and no artifact is created. ### To Reproduce 1. Have the agent queue a `create_artifact` tool call (or resume a task with a pending `create_artifact` call). 2. When the queued call is replayed, the tool errors instead of creating the artifact. ### Actual behavior The replay paths invoke `create_artifact(**args, workspace=workspace)`, but `create_artifact` does not declare a `workspace` parameter — it receives the workspace via `__context__`, like every other tool. So every replayed `create_artifact` call raises: ``` TypeError: create_artifact() got an unexpected keyword argument 'workspace' ``` ### Expected behavior Queued/replayed `create_artifact` calls should succeed. The call should inject `__context__` (including `call_id`) the same way `execute_tool` does for all other tools on the same paths, e.g.: ```python result = await create_artifact( **args, __context__={**tool_ctx, "call_id": item["call_id"]} ) ``` Affected sites are in `run_chat_task` in `cptr/utils/chat_task.py`. ### Environment - Latest main ---
Author
Owner

@owui-terminator[bot] commented on GitHub (Sep 5, 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:

  1. 🟣 #110 bug: Issue with create_artifact (Plan Mode)
    This is directly about create_artifact failing with a workspace argument mismatch in chat_task.py. The earlier report describes the same function and the same TypeError family, making it the closest match to the replay-path bug.
    by rgaricano

💡 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.

<!-- gh-comment-id:5550969693 --> @owui-terminator[bot] commented on GitHub (Sep 5, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#110](https://github.com/open-webui/computer/issues/110) **bug: Issue with create_artifact (Plan Mode)** *This is directly about `create_artifact` failing with a `workspace` argument mismatch in `chat_task.py`. The earlier report describes the same function and the same TypeError family, making it the closest match to the replay-path bug.* *by rgaricano* --- 💡 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.
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
open-webui/computer#164
No description provided.