693641aa8b
The Chat Completions schema has no `name` field on `role: tool` (only on the long-removed `role: function`), but Hermes carries the tool name over onto the result message. Permissive providers ignore it; strict ones (aki.io) reject the whole payload with `contains item with unknown key name`, which breaks every tool call in the session. Follow-up to the review on #51365: - The strip now goes through the copy-on-write `mutable_msg()` path in `convert_messages()`, preserving the identity/copy-on-write contract instead of mutating `msg` in place. - `handle_max_iterations()` hand-builds its summary payload and calls `chat.completions.create()` directly, bypassing the transport, so it leaked `name` even with the transport fixed. It now mirrors the same role-qualified removal, next to the existing tool_name/codex_*/timestamp strips. The removal is role-qualified: `name` stays on user/assistant messages, where it is schema-valid. Regression coverage on both paths; both tests fail without the fix.