hermes - ✅(Solved) Fix Matrix: add config option to auto-thread DM conversations [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15398Fetched 2026-04-25 06:22:49
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
1
Timeline (top)
labeled ×4cross-referenced ×1

Currently auto_thread only applies to group rooms — DMs are explicitly excluded (if not is_dm and not thread_id and self._auto_thread). There's no config option to enable auto-threading in DMs.

Threads in DMs are useful for organizing conversation history — each exchange gets its own thread, making it easy to scroll back through past topics.

Root Cause

Currently auto_thread only applies to group rooms — DMs are explicitly excluded (if not is_dm and not thread_id and self._auto_thread). There's no config option to enable auto-threading in DMs.

Threads in DMs are useful for organizing conversation history — each exchange gets its own thread, making it easy to scroll back through past topics.

Fix Action

Workaround

Removing not is_dm from the condition works but doesn't survive hermes update.

PR fix notes

PR #15399: feat(matrix): add dm_auto_thread config for DM auto-threading

Description (problem / solution / changelog)

Summary

Adds a new MATRIX_DM_AUTO_THREAD configuration option (default: false) that controls auto-threading behavior in DM rooms independently from channel auto-threading (MATRIX_AUTO_THREAD).

Closes #15398

Changes

  • gateway/platforms/matrix.py: Add _dm_auto_thread attribute initialized from MATRIX_DM_AUTO_THREAD env var. Update auto-thread condition to apply _auto_thread for rooms and _dm_auto_thread for DMs.
  • hermes_cli/config.py: Add MATRIX_DM_AUTO_THREAD to the env var allowlist and the optional env vars config schema.
  • tests/gateway/test_matrix.py: Add TestMatrixDmAutoThread test class verifying DM auto-threading is created when enabled and absent when disabled.

Test plan

  • test_dm_auto_thread_enabled_creates_thread — DM with dm_auto_thread=True sets thread_id
  • test_dm_auto_thread_disabled_no_thread — DM with dm_auto_thread=False preserves no-thread behavior
  • Existing test suite passes (no regressions)

Changed files

  • gateway/platforms/matrix.py (modified, +5/-1)
  • hermes_cli/config.py (modified, +9/-1)
  • tests/gateway/test_matrix.py (modified, +50/-0)
RAW_BUFFERClick to expand / collapse

Summary

Currently auto_thread only applies to group rooms — DMs are explicitly excluded (if not is_dm and not thread_id and self._auto_thread). There's no config option to enable auto-threading in DMs.

Threads in DMs are useful for organizing conversation history — each exchange gets its own thread, making it easy to scroll back through past topics.

Current behavior

  • matrix.auto_thread: true → threads in rooms only
  • matrix.dm_mention_threads: true → threads in DMs only when @mentioned
  • No way to auto-thread every DM message

Proposed behavior

Add a config option like matrix.dm_auto_thread: true (default false for backwards compat) that creates a thread for every DM message, same as auto_thread does for rooms.

The patch is a one-line change in gateway/platforms/matrix.py — the not is_dm guard on the auto-thread block (currently around line 1281).

Workaround

Removing not is_dm from the condition works but doesn't survive hermes update.

extent analysis

TL;DR

To enable auto-threading in DMs, add a new config option matrix.dm_auto_thread and modify the condition in gateway/platforms/matrix.py to include DMs.

Guidance

  • The current implementation excludes DMs from auto-threading due to the not is_dm condition, which needs to be modified or extended.
  • A new config option matrix.dm_auto_thread can be introduced to control auto-threading in DMs, defaulting to false for backwards compatibility.
  • The proposed change involves a one-line modification in gateway/platforms/matrix.py, specifically removing or altering the not is_dm guard.
  • To verify the fix, test DM conversations with the new config option enabled and check if each message is correctly threaded.

Example

# Example of the proposed change in gateway/platforms/matrix.py
if not thread_id and self._auto_thread and (not is_dm or self._dm_auto_thread):
    # auto-threading logic

Notes

The solution assumes that the hermes update process can be modified to preserve custom changes or that the new config option will be officially supported in future updates.

Recommendation

Apply workaround: Introduce the matrix.dm_auto_thread config option and modify the condition in gateway/platforms/matrix.py to enable auto-threading in DMs, as this provides the desired functionality despite not being an official fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Matrix: add config option to auto-thread DM conversations [1 pull requests, 1 participants]