You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proxy): strip empty optional fields from streamed tool inputs
gpt-5.5 occasionally emits unused optional fields (e.g. "pages":"" on
the Read tool) when generating function calls. The proxy was forwarding
each input_json_delta as-is, so the polluted input reached claudecode
and the model in subsequent turns kept rationalizing "the tool layer
brought in empty pages" — issue james-6-23#95.
Buffer function_call_arguments deltas until output_item.done, drop
top-level keys whose value is "" or null, then emit the cleaned JSON
as a single input_json_delta before content_block_stop. Also apply the
same cleanup when reconstructing tool_use blocks from non-streaming
response.completed payloads and when re-encoding historical assistant
tool_use blocks back into upstream function_call items.
Empty objects/arrays and whitespace strings are preserved (some tools
treat those as meaningful). Trade-off: claudecode no longer sees tool
arguments stream char-by-char, but tool JSON is small enough that the
UX delta is imperceptible.
0 commit comments