hermes - ✅(Solved) Fix [Bug]: First-run onboarding on Slack tells users to type /sethome, but Slack only dispatches /hermes <subcommand> [3 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#14632Fetched 2026-04-24 06:15:53
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×3

When a user sends their first message to a Hermes Slack bot, the gateway posts a one-time onboarding hint:

📬 No home channel is set for Slack. A home channel is where Hermes delivers cron job results and cross-platform messages.

Type /sethome to make this chat your home channel, or ignore to skip.

This instruction is wrong for Slack. Slack's adapter registers a single parent slash command /hermes at gateway/platforms/slack.py:211 and dispatches subcommands via slack_subcommand_map(). Typing /sethome in Slack produces:

/sethome failed because the app did not respond. Please try again or contact the app developer.

…and the gateway logs:

WARNING slack_bolt.AsyncApp: Unhandled request ({'type': None, 'command': '/sethome'})

The correct invocation on Slack is /hermes sethome.

Root Cause

The onboarding string in gateway/run.py:4422 is platform-agnostic, but Slack is the only supported platform where top-level commands must be namespaced under a single parent slash command. Telegram, Discord, Matrix, Mattermost all accept /sethome directly.

Fix Action

Fix / Workaround

This instruction is wrong for Slack. Slack's adapter registers a single parent slash command /hermes at gateway/platforms/slack.py:211 and dispatches subcommands via slack_subcommand_map(). Typing /sethome in Slack produces:

PR fix notes

PR #14633: fix(gateway): use /hermes sethome in onboarding hint on Slack

Description (problem / solution / changelog)

Summary

Fixes the Slack-specific first-run onboarding hint so it shows the correct slash-command syntax.

Closes #14632.

Problem

On a fresh Slack install, the gateway posts this onboarding message:

📬 No home channel is set for Slack. ...

Type /sethome to make this chat your home channel, or ignore to skip.

But Slack's adapter registers only the parent command /hermes (gateway/platforms/slack.py:211) and dispatches subcommands via slack_subcommand_map(). So typing /sethome as instructed fails:

/sethome failed because the app did not respond. Please try again or contact the app developer.

…with this warning in the gateway log:

WARNING slack_bolt.AsyncApp: Unhandled request ({'type': None, 'command': '/sethome'})

The correct invocation on Slack is /hermes sethome.

Change

Branch the hint text on source.platform:

  • Platform.SLACK/hermes sethome
  • everything else → /sethome (unchanged — Telegram, Discord, Matrix, Mattermost, etc. all register /sethome directly)

Added a short comment explaining why Slack is special so the branch doesn't look arbitrary to future readers.

Diff

             if not os.getenv(env_key):
                 adapter = self.adapters.get(source.platform)
                 if adapter:
+                    # Slack dispatches all Hermes commands through a single
+                    # parent slash command `/hermes`; bare `/sethome` is not
+                    # registered and would fail with "app did not respond".
+                    sethome_cmd = (
+                        "/hermes sethome"
+                        if source.platform == Platform.SLACK
+                        else "/sethome"
+                    )
                     await adapter.send(
                         source.chat_id,
                         f"📬 No home channel is set for {platform_name.title()}. "
                         f"A home channel is where Hermes delivers cron job results "
                         f"and cross-platform messages.\n\n"
-                        f"Type /sethome to make this chat your home channel, "
+                        f"Type {sethome_cmd} to make this chat your home channel, "
                         f"or ignore to skip."
                     )

Testing

  • python -c "import ast; ast.parse(open('gateway/run.py').read())" → OK
  • grep -r "No home channel is set" tests/ → no test pins this string, so no test update needed
  • Manually verified on a live Slack workspace: /hermes sethome succeeds (sets home channel), whereas /sethome produces "app did not respond" + slack_bolt Unhandled request warning

Notes for reviewers

A more general refactor would introduce something like adapter.format_slash_command("sethome") so platform-specific wire formats live in the adapter rather than call sites. I kept this PR minimal and focused on the user-visible bug. Happy to follow up with that refactor if you'd like — it would also compose cleanly with #11832 (per-profile Slack slash-command names), where the Slack adapter would return "/<profile_name> sethome" instead of hardcoding /hermes.

Changed files

  • gateway/run.py (modified, +9/-1)

PR #14645: fix(gateway): use Slack slash command in onboarding

Description (problem / solution / changelog)

Fixes #14632.

Root cause

The first-run home-channel onboarding message in gateway/run.py was platform-agnostic and always suggested /sethome. That is wrong on Slack, where Hermes dispatches slash commands through /hermes <subcommand>.

What changed

  • use /hermes sethome in the onboarding hint for Slack only
  • preserve /sethome for platforms that support direct top-level commands
  • add regression tests for both Slack and non-Slack onboarding paths

Tests

  • python -m pytest tests/gateway/test_status_command.py -q --tb=short
  • git diff --check

Changed files

  • gateway/run.py (modified, +2/-1)
  • tests/gateway/test_status_command.py (modified, +94/-7)

PR #14865: fix: use /hermes sethome in Slack onboarding

Description (problem / solution / changelog)

Summary

  • use /hermes sethome in the no-home-channel onboarding prompt for Slack
  • keep /sethome for other chat platforms
  • add a regression test covering Slack and Telegram onboarding copy

Testing

  • python3 -m pytest -o addopts= tests/gateway/test_home_channel_onboarding.py

Closes #14632

Changed files

  • gateway/run.py (modified, +6/-1)
  • tests/gateway/test_home_channel_onboarding.py (added, +125/-0)

Code Example

WARNING slack_bolt.AsyncApp: Unhandled request ({'type': None, 'command': '/sethome'})

---

--- a/gateway/run.py
+++ b/gateway/run.py
@@ -4414,13 +4414,14 @@
             if not os.getenv(env_key):
                 adapter = self.adapters.get(source.platform)
                 if adapter:
+                    sethome_cmd = "/hermes sethome" if source.platform == Platform.SLACK else "/sethome"
                     await adapter.send(
                         source.chat_id,
                         f"📬 No home channel is set for {platform_name.title()}. "
                         f"A home channel is where Hermes delivers cron job results "
                         f"and cross-platform messages.\n\n"
-                        f"Type /sethome to make this chat your home channel, "
+                        f"Type {sethome_cmd} to make this chat your home channel, "
                         f"or ignore to skip."
                     )
RAW_BUFFERClick to expand / collapse

Summary

When a user sends their first message to a Hermes Slack bot, the gateway posts a one-time onboarding hint:

📬 No home channel is set for Slack. A home channel is where Hermes delivers cron job results and cross-platform messages.

Type /sethome to make this chat your home channel, or ignore to skip.

This instruction is wrong for Slack. Slack's adapter registers a single parent slash command /hermes at gateway/platforms/slack.py:211 and dispatches subcommands via slack_subcommand_map(). Typing /sethome in Slack produces:

/sethome failed because the app did not respond. Please try again or contact the app developer.

…and the gateway logs:

WARNING slack_bolt.AsyncApp: Unhandled request ({'type': None, 'command': '/sethome'})

The correct invocation on Slack is /hermes sethome.

Reproduction

  1. Add a Hermes Slack bot to a fresh workspace (no SLACK_HOME_CHANNEL env var set).
  2. DM the bot anything.
  3. Receive the onboarding hint suggesting /sethome.
  4. Register /sethome as a Slack slash command (as the hint implies), or attempt to type it directly → fails.

Root cause

The onboarding string in gateway/run.py:4422 is platform-agnostic, but Slack is the only supported platform where top-level commands must be namespaced under a single parent slash command. Telegram, Discord, Matrix, Mattermost all accept /sethome directly.

Suggested fix

Minimal one-line branch — show the Slack-specific syntax only for Slack:

--- a/gateway/run.py
+++ b/gateway/run.py
@@ -4414,13 +4414,14 @@
             if not os.getenv(env_key):
                 adapter = self.adapters.get(source.platform)
                 if adapter:
+                    sethome_cmd = "/hermes sethome" if source.platform == Platform.SLACK else "/sethome"
                     await adapter.send(
                         source.chat_id,
                         f"📬 No home channel is set for {platform_name.title()}. "
                         f"A home channel is where Hermes delivers cron job results "
                         f"and cross-platform messages.\n\n"
-                        f"Type /sethome to make this chat your home channel, "
+                        f"Type {sethome_cmd} to make this chat your home channel, "
                         f"or ignore to skip."
                     )

A more thorough fix would add a helper like adapter.format_slash_command("sethome") so future platform additions (Teams, Zulip) can opt in without touching this call site. That generalizes cleanly with #11832 (per-profile Slack slash command names) — if that lands, the Slack adapter would return "/<profile_name> sethome" instead of the hardcoded /hermes.

Environment

  • Hermes Agent, Slack adapter via Socket Mode
  • Slack app with only /hermes registered (no /sethome)

extent analysis

TL;DR

Update the onboarding hint in gateway/run.py to use the correct Slack syntax, /hermes sethome, instead of /sethome.

Guidance

  • Identify the platform-specific syntax requirements for each supported platform to ensure correct command invocation.
  • Update the gateway/run.py file to conditionally use the correct syntax based on the platform, as shown in the suggested fix.
  • Consider implementing a helper function, such as adapter.format_slash_command("sethome"), to generalize the solution for future platform additions.
  • Verify the fix by testing the onboarding hint on different platforms, including Slack, to ensure the correct syntax is used.

Example

The suggested fix provides a minimal code snippet that demonstrates the update:

sethome_cmd = "/hermes sethome" if source.platform == Platform.SLACK else "/sethome"

This code checks the platform and sets the sethome_cmd variable to the correct syntax.

Notes

The current implementation assumes that only Slack requires a namespaced command. If other platforms are added in the future, the solution may need to be updated to accommodate their syntax requirements.

Recommendation

Apply the workaround by updating the gateway/run.py file to use the correct Slack syntax, as this is a straightforward fix that addresses the specific issue with the onboarding hint on Slack.

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