e45f2b39e2
The codex app-server namespaces MCP tool call ids as codex_mcp__<server>__<tool>_<codex_call_id>. With an exec-<uuid> component the built-in hermes-tools server alone overflows the Responses API's 64-char call_id limit, so the request 400s with a non-retryable "string too long". The offending item sits near the head of the transcript and replays every turn, permanently bricking the session — the only recovery is /reset. Sibling defect to #10788, which clamped input[*].id via _MAX_RESPONSES_ITEM_ID_LENGTH. Apply the same treatment to call_id at both Responses emit sites in _chat_messages_to_responses_input: a deterministic surrogate (call_ + sha256[:32]) for ids over the limit, short ids unchanged. Because the surrogate is a pure function of the original id, a function_call and its matching function_call_output — which carry the same original id — map to the same surrogate and stay paired without correlating the two items.