Config option for reasoning output display format
Cluster 25574 · gateway. Data as of
Nothing open on GitHub. Fix merged in #51168 on 23 Jun 2026. Check it covers your case.
The short answer
- Known?
- Yes. 3 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #51168. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
unresolved. That is separate from the fix event. - Still open
- Nothing open on GitHub.
These members add a configurable option to control how reasoning output is displayed, with at least one implementation rendering it as subtext in Discord. The work covers both the config option design and specific rendering style variants.
Open issues0
Open PRs0
Fixes on record
-
#51168 feat(discord): render reasoning as -# subtext via display.reasoning_style
files:
gateway/display_config.py,gateway/run.py,hermes_cli/config.py,tests/gateway/test_display_config.pyShow the diff
-
gateway/display_config.py@@ -34,6 +34,12 @@ "tool_progress": "all", "tool_progress_grouping": "accumulate", # "accumulate" = edit one bubble; "separate" = one msg per tool "show_reasoning": False, + # How a reasoning/thinking summary is rendered when show_reasoning is on. + # "code" -> 💭 **Reasoning:** + fenced code block (legacy default) + # "blockquote"-> each line prefixed with "> " + # "subtext" -> each line prefixed with "-# " (Discord small grey subtext) + # Discord defaults to "subtext"; everywhere else defaults to "code". + "reasoning_style": "code", "tool_preview_length": 0, "streaming": None, # None = follow top-level streaming config # Gateway-only assistant/status chatter controls. These default on for @@ -111,7 +117,10 @@ "tool_progress": "off", "busy_ack_detail": False, }, - "discord": _TIER_HIGH, + # Discord has a native "subtext" primitive (-# small grey text) that reads + # as metadata rather than content, so reasoning summaries default to it + # here instead of the fenced code block used elsewhere. + "discord": {**_TIER_HIGH, "reasoning_style": "subtext"}, # Tier 2 — edit support, often customer/workspace channels # Slack: tool_progress off by default — Bolt posts cannot be edited like CLI; @@ -242,6 +251,9 @@ def _normalise(setting: str, value: Any) -> Any: if setting == "tool_progress_grouping": val = str(value).lower() return val if val in ("accumulate", "separate") else "accumulate" + if setting == "reasoning_style": + val = str(value).lower() + return val if val in ("code", "blockquote", "subtext") else "code" if setting == "tool_preview_length": try: return int(value) -
gateway/run.py@@ -9727,7 +9727,31 @@ async def _handle_message_with_agent(self, event, source, _quick_key: str, run_g display_reasoning += f"\n_... ({len(lines) - 15} more lines)_" else: display_reasoning = last_reasoning.strip() - response = f"💭 **Reasoning:**\n```\n{display_reasoning}\n```\n\n{response}" + # Render style is per-platform: Discord defaults to "-# " + # subtext (native small grey metadata text); other + # platforms keep the fenced code block. + try: + from gateway.display_config import resolve_display_setting + _reasoning_style = resolve_display_setting( + _load_gateway_config(), + _platform_config_key(source.platform), + "reasoning_style", + "code", + ) + except Exception: + _reasoning_style = "code" + if _reasoning_style == "subtext": + _quoted = "\n".join( + f"-# {ln}" if ln else "-#" for ln in display_reasoning.splitlines() + ) + response = f"-# 💭 Reasoning\n{_quoted}\n\n{response}" + elif _reasoning_style == "blockquote": + _quoted = "\n".join( + f"> {ln}" if ln else ">" for ln in display_reasoning.splitlines() + ) + response = f"> 💭 **Reasoning:**\n{_quoted}\n\n{response}" + else: + response = f"💭 **Reasoning:**\n```\n{display_reasoning}\n```\n\n{response}" # Runtime-metadata footer — only on the FINAL message of the turn. # Off by default (display.runtime_footer.enabled=false). When -
hermes_cli/config.py@@ -1667,6 +1667,12 @@ def _ensure_hermes_home_managed(home: Path): # applies where tool_progress is already enabled. Per-platform override # via display.platforms.<platform>.tool_progress_grouping. "tool_progress_grouping": "accumulate", + # How a reasoning/thinking summary renders when show_reasoning is on. + # "code" (default) = 💭 fenced code block; "blockquote" = "> " lines; + # "subtext" = "-# " lines (Discord small grey metadata text). Discord + # defaults to "subtext"; override per-platform via + # display.platforms.<platform>.reasoning_style. + "reasoning_style": "code", # Auto-delete system-notice replies (e.g. "✨ New session started!", # "♻ Restarting gateway…", "⚡ Stopped…") after N seconds on platforms # that support message deletion (currently Telegram; other platforms -
tests/gateway/test_display_config.py@@ -510,3 +510,48 @@ def test_case_insensitive(self): resolve_display_setting(config, "telegram", "tool_progress_grouping") == "separate" ) + + +class TestReasoningStyle: + """Per-platform reasoning render style (code | blockquote | subtext).""" + + def test_discord_defaults_to_subtext(self): + from gateway.display_config import resolve_display_setting + + assert resolve_display_setting({}, "discord", "reasoning_style") == "subtext" + + def test_other_platforms_default_to_code(self): + from gateway.display_config import resolve_display_setting + + for plat in ("telegram", "slack", "matrix", "api_server"): + assert ( + resolve_display_setting({}, plat, "reasoning_style") == "code" + ), plat + + def test_platform_override_wins(self): + from gateway.display_config import resolve_display_setting + + config = {"display": {"platforms": {"discord": {"reasoning_style": "blockquote"}}}} + assert ( + resolve_display_setting(config, "discord", "reasoning_style") == "blockquote" + ) + + def test_global_override(self): + from gateway.display_config import resolve_display_setting + + config = {"display": {"reasoning_style": "subtext"}} + assert ( + resolve_display_setting(config, "telegram", "reasoning_style") == "subtext" + ) + + def test_invalid_value_falls_back_to_code(self): + from gateway.display_config import resolve_display_setting + + config = {"display": {"reasoning_style": "bogus"}} + assert resolve_display_setting(config, "telegram", "reasoning_style") == "code" + + def test_case_insensitive(self): + from gateway.display_config import resolve_display_setting + + config = {"display": {"reasoning_style": "SUBTEXT"}} + assert resolve_display_setting(config, "telegram", "reasoning_style") == "subtext"
-
1 PR closed without merging
From the close comments: done elsewhere 1
-
#25933 feat(display): add reasoning_format config option for reasoning output style (#25574) · done elsewhere →
6cc07b6,#51168,#25574
Closed issues · 1
- Closed#25574Add display.reasoning_format config option (code vs quote)
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.67: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the LabAt a glance
- Subsystem
- gateway
- Merged PRs
- #51168
- Closed issues
- 1
- Attempts
- 1 PR closed without merging
- Fix link checked
- 23 Jun 2026