Skip to content

release: 0.16.6 — no-argument tools were uncallable on Anthropic - #153

Merged
yuanhao merged 1 commit into
release/0.16.xfrom
fix/0.16.x-no-arg-tools
Aug 22, 2026
Merged

release: 0.16.6 — no-argument tools were uncallable on Anthropic#153
yuanhao merged 1 commit into
release/0.16.xfrom
fix/0.16.x-no-arg-tools

Conversation

@yuanhao

@yuanhao yuanhao commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Forward-port of the fix from the 0.18.0 line, plus the patch bump.

The bug

A tool whose schema takes no arguments has no JSON to stream, but Anthropic still emits an input_json_delta carrying "". serde_json::from_str("") fails with "EOF while parsing a value", so the __partial_json sentinel survived content_block_stop and the post-stream sweep failed the whole turn:

tool call(s) with unusable arguments, not executed: `read_log` ()

Every get_status / list_files / read_log-shaped tool is affected. Verified present on this line — the from_str(&partial) call site here is byte-identical to the one on main before the fix.

An empty accumulator is an empty argument object, not malformed input. The decision is now resolve_tool_arguments, a pure function with a regression test; genuinely truncated JSON still fails, which is what the sentinel exists for.

How it was found

A live smoke harness on the 0.18 line, not the test suite. MockProvider never streams SSE, so nothing in either line's tests exercised the tool-call accumulator at all — which is why it survived here through five patch releases.

Scope

Deliberately minimal. This line's claude_sonnet_5 still carries the stale $3/$15 rates; leaving that alone per instruction.

Tests and clippy green on this branch. Tagging follows the maintenance-line convention — from release/0.16.x, not main.

🤖 Generated with Claude Code

A tool whose schema takes no arguments has no JSON to stream, and
Anthropic still emits an input_json_delta carrying "".
serde_json::from_str("") fails with "EOF while parsing a value", so the
__partial_json sentinel survived content_block_stop and the post-stream
sweep failed the whole turn with "tool call(s) with unusable arguments,
not executed". Every no-argument tool was affected.

An empty accumulator is an empty argument object, not malformed input.
The decision is extracted into resolve_tool_arguments so it has a
regression test; truncated JSON still fails, which is the case the
sentinel exists for.

Forward-ported from the 0.18.0 line, where a live smoke harness found it.
MockProvider never streams SSE, so nothing in the suite exercised the
tool-call accumulator.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@yuanhao
yuanhao merged commit 9c83ba2 into release/0.16.x Aug 22, 2026
5 checks passed
@yuanhao
yuanhao deleted the fix/0.16.x-no-arg-tools branch August 22, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant