Skip to content

Slack bridge sends raw markdown instead of Slack mrkdwn format #331

@ofhtech

Description

@ofhtech

Bug Report

Version: Agent Deck v0.25.1
OS: Linux 6.6.87.2 (WSL2)
tmux: 3.4

Description

The conductor Slack bridge forwards conductor responses as raw GitHub-flavored markdown, which Slack doesn't render. Slack uses its own mrkdwn format — e.g., *bold* instead of **bold**, no # headers, bullets instead of - .

Steps to Reproduce

  1. Set up a conductor with Slack bridge (agent-deck conductor setup)
  2. Send a message that triggers a response with markdown formatting (bold, headers, bullet lists)
  3. Response appears in Slack with raw **text**, ## headers, and - bullets

Expected vs Actual

Expected: Formatted text in Slack (bold, bullets, links rendered)
Actual: Raw markdown syntax displayed as plain text

Solution

Added a _markdown_to_slack() converter in bridge.py that transforms responses before posting via say():

def _markdown_to_slack(text: str) -> str:
    """Convert GitHub-flavored markdown to Slack mrkdwn format."""
    text = re.sub(r"^#{1,6}\s+(.+)$", r"*\1*", text, flags=re.MULTILINE)  # headers
    text = re.sub(r"\*\*(.+?)\*\*", r"*\1*", text)  # bold
    text = re.sub(r"~~(.+?)~~", r"~\1~", text)  # strikethrough
    text = re.sub(r"\[([^\]]+)\]\(([^)]+)\)", r"<\2|\1>", text)  # links
    text = re.sub(r"^(\s*)[-*]\s+", r"\1• ", text, flags=re.MULTILINE)  # bullets
    return text

Applied in _safe_say() so all Slack responses are converted automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions