Skip to content

feat(slack): render thinking/reasoning blocks as collapsible sections #19411

@markshields-tl

Description

@markshields-tl

Problem

When models emit thinking/reasoning blocks (e.g., Anthropic extended thinking, <think> tags), Slack sessions stream the raw reasoning text inline with the response. This creates long, verbose messages that obscure the actual answer.

Desired Behavior

Render thinking/reasoning content as collapsible sections in Slack messages — similar to how Cursor shows reasoning in a collapsed "Thinking..." block that users can click to expand.

Slack supports this via:

  • Block Kit attachments with expandable content
  • context blocks for metadata
  • Collapsible rich text sections

Implementation Notes

This lives in the Slack provider's outbound message rendering pipeline — the same area as thread context handling (prepare.ts, Slack message formatting). Thinking blocks are already parsed and separated from response content; the change is in how they're presented rather than discarded.

Approach options:

  1. Slack attachment — render thinking as a collapsed attachment with a summary line
  2. Block Kit — use Slack's rich text blocks with a disclosure pattern
  3. Separate message — post thinking as a threaded reply to the main response (most native)

Related


🤖 AI-assisted (Claude via OpenClaw). Author understands the proposed changes and Slack API constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions