Skip to content

fix(gateway): fix matrix lingering typing indicator - #10239

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
asheriif:fix-matrix-typing-indicator
Apr 15, 2026
Merged

fix(gateway): fix matrix lingering typing indicator#10239
teknium1 merged 1 commit into
NousResearch:mainfrom
asheriif:fix-matrix-typing-indicator

Conversation

@asheriif

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the Matrix typing indicator lingering for ~30 seconds after Hermes has already sent a response.

Matrix typing events were sent with a 30000 ms timeout, but the Matrix adapter inherited the base stop_typing() no-op. As a result, cleanup calls after agent completion did not send a “typing stopped” event, so Matrix clients kept showing Hermes as typing until the timeout expired.

This PR adds a Matrix-specific stop_typing() implementation that calls set_typing(..., timeout=0), which mautrix sends as typing: false.

Testing

python -m pytest tests/gateway/test_matrix.py -q

Result:

112 passed in 1.57s

Related Issue

Fixes #6016

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • Add MatrixAdapter.stop_typing() to explicitly clear Matrix typing state.
  • Add regression coverage asserting Matrix typing cleanup sends timeout=0.

How to Test

  1. Receive a message from your agent on Matrix
  2. Typing indicator is cleared once the message arrives

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

@teknium1
teknium1 merged commit 33ae403 into NousResearch:main Apr 15, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Matrix typing indicator lingers for up to 30 seconds after response is sent

2 participants