mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #196] bug: tool-call arguments are never captured — input_json_delta fragments are ignored #115
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#115
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 28, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/196
Summary
The Claude Code adapter reads a
tool_useblock'sinputatcontent_block_start, where it is always{}, and never handles theinput_json_deltafragments that carry the actual arguments. The real arguments are discarded at ingest, so no downstream consumer — cptr's own UI, the gateway, the database — can ever show what a tool did.Verified still present in v0.9.15 —
cptr/utils/agents/claude_code.pyis byte-identical between thev0.9.10andv0.9.15tags.Symptom
Tool calls surface as a bare name with no detail. You can see that
Bashran; you can never see what command it ran.Root cause
Anthropic streams a
tool_useblock'sinputas a series ofinput_json_deltafragments that arrive aftercontent_block_start. The block observed at start time therefore always hasinput == {}._tool_update_from_claude_startreadsblock.get("input")at exactly that moment, the streaming loop never handlesinput_json_deltaat all, and atcontent_block_stopthe same stale dict is re-emitted (L185–201):grep input_json_deltaover the adapter returns nothing on either tag.The non-streaming path has the same gap from the other direction: the
AssistantMessagebranch handlesTextBlockandThinkingBlockonly, soToolUseBlock— which does carry the completeinput— is ignored there too.Suggested fix
Accumulate
partial_jsonper content-block index andjson.loadsit atcontent_block_stop, then merge intoarguments. Worth merging in a way that cptr's own display key (title, see the related rendering issue) can't be shadowed by a tool argument that happens to share the name.Happy to open a PR.
@tjbck commented on GitHub (Jul 31, 2026):
Should be addressed!