Empty temporary system messages are now stripped from conversation history before it's sent
A new mechanism cleans up the internal message list before it's sent to the model. It drops ephemeral (temporary) system messages that have no content and no attached tool additions, and when a message's temporary content is cleared, it appends a marker message set to clear at the next user message. If this cleanup process fails for any reason, Claude Code falls back to the previous, unmodified behavior.
This keeps empty placeholder messages from cluttering the conversation sent to the model, while the fallback ensures nothing breaks if the new cleanup logic runs into an unexpected case.