Model inserts hard line breaks in MCP tool parameters, breaking Slack/Gmail draft formatting

Resolved 💬 12 comments Opened Mar 10, 2026 by marty-itsec Closed May 3, 2026

When composing text for MCP tool parameters (e.g., slack_send_message_draft, gmail_create_draft), the model inserts hard \n characters within paragraphs at ~60-70 character intervals. These newlines are passed through by the MCP transport to the downstream APIs (Slack, Gmail), which render them as visible line breaks instead of allowing text to reflow naturally.

This is particularly bad on mobile, where every mid-paragraph line break becomes a visible new line, making messages look broken.

Reproduction:

  1. Use Claude Code with the built-in Slack MCP integration
  2. Ask Claude to draft a Slack message longer than ~70 characters
  3. Observe that the message parameter contains \n characters mid-paragraph
  4. The resulting Slack draft renders with hard line breaks instead of flowing text

Same behavior occurs with Gmail draft creation and any text output intended for copy-paste into external tools.

Timeline:

  • Not observed prior to ~March 7, 2026
  • First noticed March 9, 2026
  • Confirmed March 11, 2026 (affects all drafted comms)

Investigation: Reviewed changelogs for Claude Code 2.1.70 through 2.1.72. No changes to MCP transport, tool parameter handling, or text formatting. The issue appears to be a model-side behavior change, not a client-side regression.

Workaround: Instructing the model via CLAUDE.md to "write every paragraph as ONE continuous unbroken string with no mid-paragraph line breaks" partially mitigates the issue, but compliance is inconsistent.

Expected behavior: Text composed for MCP tool string parameters should not contain hard line breaks within paragraphs. Paragraph separation (\n\n) is fine; mid-sentence wrapping (\n at ~70 chars) is not.

Environment: Claude Code 2.1.72, macOS, claude-opus-4-6, built-in Slack and Gmail MCP integrations

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗