1610fe8efd
Stored tool call ids are minted per turn (terminal:0, terminal:1…), so the same id recurs on later turns of one session. The Responses adapter replayed each pair verbatim, putting the same call_id on the wire N times; strict validators (opencode Console, OpenAI) reject the request with 400 "Duplicate function_call_output for call_id" and every retry fails the same way (#102629, #111231 bug 1). Every occurrence past the first now gets a `_dup<n>` wire id and the matching tool output pops the id its function_call was given, in call order, so pairs stay intact and stored history is untouched. Re-applied onto the facade split (helpers moved into _replay_tool_call_items / _tool_output_items) from PR #102634.