Repository navigation
fix(slack): render agent replies with native Markdown - #2932
Merged
Merged
Conversation
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mukil Loganathan (langchain-infra)
approved these changes
Sep 18, 2026
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Comment on lines
+9
to
+15
| def markdown_to_mrkdwn(markdown: str) -> str: | ||
| """Convert standard Markdown to Slack mrkdwn.""" | ||
| output: list[str] = [] | ||
| list_stack: list[tuple[bool, int]] = [] | ||
| quote_depth = 0 | ||
| item_prefix = "" | ||
| in_heading = False |
Contributor
Author
There was a problem hiding this comment.
fyi I am not reading or testing this carefully, since this is just rough fallback handling for a pretty extreme edge case. if we actually encounter rendering issues on this path, we can revisit
Parker J. Rule (pjrule)
marked this pull request as ready for review
September 18, 2026 01:35
Parker J. Rule (pjrule)
enabled auto-merge (squash)
September 18, 2026 01:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses native Slack Markdown blocks for agent replies up to 12,000 characters, including language-tagged code fences, ephemeral answers, and option prompts. (Long ordinary replies fall back to mrkdwn.)
Motivated by a bug I saw when using Open SWE with Slack: code blocks in mrkdwn mode are rendered with non-breaking space characters, which generally produce code blocks that cannot be copy-and-pasted.