hermes - 💡(How to fix) Fix Matrix: implement SAS device verification for bot identities [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#12603Fetched 2026-04-20 12:18:00
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

Cross-signing keys can already be bootstrapped for bot identities (OTKs + master/self-signing/user-signing keys via OlmMachine.generate_recovery_key()). The gap is purely the interactive verification flow at the client level.

Root Cause

When a user clicks "Verify User" on a bot's Matrix profile, Element shows "Waiting for [bot] to accept..." indefinitely and times out. The bot never responds because the Matrix platform doesn't handle m.key.verification.* to-device events.

RAW_BUFFERClick to expand / collapse

Problem

When a user clicks "Verify User" on a bot's Matrix profile, Element shows "Waiting for [bot] to accept..." indefinitely and times out. The bot never responds because the Matrix platform doesn't handle m.key.verification.* to-device events.

This means bot devices always show as unverified (grey shield) in Element, even after cross-signing is bootstrapped.

Expected behavior

The bot should auto-accept and complete SAS verification when a user initiates it, so the device shows as verified (green checkmark) in Element.

What's needed

The mautrix library already provides the verification primitives via OlmMachine. The Matrix platform needs a handler for incoming verification requests that:

  1. Accepts the request (m.key.verification.ready)
  2. Completes the SAS protocol (m.key.verification.startm.key.verification.keym.key.verification.mac)
  3. Optionally notifies the user via the bot's chat so they know to check their emoji/number comparison

Context

Cross-signing keys can already be bootstrapped for bot identities (OTKs + master/self-signing/user-signing keys via OlmMachine.generate_recovery_key()). The gap is purely the interactive verification flow at the client level.

extent analysis

TL;DR

Implement a handler for m.key.verification.* to-device events in the Matrix platform to enable auto-acceptance of verification requests.

Guidance

  • Develop a handler that listens for incoming m.key.verification.request events and responds with m.key.verification.ready to accept the request.
  • Complete the SAS protocol by handling m.key.verification.start, m.key.verification.key, and m.key.verification.mac events in sequence.
  • Consider adding a notification mechanism to inform the user via the bot's chat to check their emoji/number comparison after verification.
  • Leverage the OlmMachine primitives provided by the mautrix library to implement the verification flow.

Example

No code example is provided due to the lack of specific implementation details, but the OlmMachine class from the mautrix library can be used as a starting point for implementing the verification handler.

Notes

The solution requires modifications to the Matrix platform to handle m.key.verification.* to-device events, which are currently not supported. The provided guidance assumes that the mautrix library and its OlmMachine class are properly integrated into the project.

Recommendation

Apply a workaround by implementing a custom handler for m.key.verification.* events, as the Matrix platform does not currently support these events. This will enable auto-acceptance of verification requests and completion of the SAS protocol.

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…

FAQ

Expected behavior

The bot should auto-accept and complete SAS verification when a user initiates it, so the device shows as verified (green checkmark) in Element.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING