Under the hood
Tool-result pairing debug logs now numbered and formatted with redaction helpers
What
When Claude Code detects a mismatch between tool-use and tool-result messages (a structural check called ensureToolResultPairing), the debug and error messages it logs are now built differently: each message is numbered with an index, and tool-use IDs are formatted through a redaction/formatting helper and joined with a dedicated helper function, instead of being concatenated directly into a plain string.
Why
This makes these internal diagnostic logs more structured and consistent, and applies proper redaction formatting to identifiers that appear in them.