Skip to content

fix(gateway): correct /compact to /compress in context overflow tips - #20163

Closed
zhanggttry wants to merge 3 commits into
NousResearch:mainfrom
zhanggttry:fix/gateway-compact-to-compress
Closed

fix(gateway): correct /compact to /compress in context overflow tips#20163
zhanggttry wants to merge 3 commits into
NousResearch:mainfrom
zhanggttry:fix/gateway-compact-to-compress

Conversation

@zhanggttry

Copy link
Copy Markdown
Contributor

Summary

The gateway error messages for context window overflow incorrectly reference /compact instead of the correct /compress slash command.

This affects all platforms (not just QQBot) since the error message is generated in the shared GatewayRunner in gateway/run.py.

Changes

  • gateway/run.py line ~6742: "/compact""/compress" in _is_ctx_fail error response
  • gateway/run.py line ~7070: "/compact""/compress" in status 400/500 error response for large sessions

Context

The registered slash command is /compress (defined in hermes_cli/commands.py), but the context overflow tips in gateway/run.py erroneously showed /compact. This confused users on all platforms, as reported in #20020 for QQBot.

Note: Slack does have /compact as a platform-specific alias for /compress, but the gateway error messages should reference the canonical command name.

Fixes #20020

Testing

  • 1233 gateway tests pass (6 pre-existing failures unrelated to this change)
  • Verified no other occurrences of "Use /compact" remain in Python files

The gateway error messages for context window overflow incorrectly
reference /compact instead of the correct /compress slash command.
This affects all platforms since the message is generated in the
shared gateway runner.

Fixes NousResearch#20020
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels May 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #20057 and #20027 — both address the same /compact/compress typo in context-overflow tips (fixes #20020). #20027 also adds a regression test and centralizes the guidance string.

@zhanggttry

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #20027 which also adds a regression test and centralizes the guidance string. Thanks @alt-glitch for the pointer.

@zhanggttry zhanggttry closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Compress command tips wrong

2 participants