Claude OAuth tool alias restore aborts the stream when the model writes a tool name that was not declared (still in 8.0.4)

Author: SamirLegacyCreated Sep 29, 2026Updated Sep 30, 2026
LabelsFixed

What happens

With Claude OAuth cloaking, the model sometimes writes a tool name that matches no alias of the request. The engine then ends the stream with

restore Claude OAuth tool name from streaming response: cannot restore Claude OAuth MCP tool alias "<name>": no unique request-local match

The HTTP code is already 200, so the client sees a failed call in the middle of a stream. A retry sends the same context, and the model often writes one more wrong name.

Versions

Seen on CLIProxyAPI 7.3.12. The error text is still in the 8.0.4 binary and on main (internal/runtime/executor/claude_executor_request.go, line 2471 today). Related: #4979, #5342 (closed without merge), #5949, #5035, #4916.

Evidence

13 events in 14 days on one machine. Names written by the model, with the alias prefix removed: tiny_terminap, tiny_terminter, tiny_torminal, program_excute_code, process_manage, and in one call with three attempts tiny_completed, tiny_completions, tiny_toolset. The requests held 23 to 316 tools; the context held up to 390,000 tokens.

Expected

A name that cannot be restored goes to the client as it is. The client has a normal answer for an unknown tool, and the model corrects itself in the next step. One wrong name then costs one step and not the whole call.

Source: router-for-me/CLIProxyAPI