Skip to content

fix(slack): rename /status to /agentstatus for Slack slash commands#29032

Closed
maloqab wants to merge 3 commits intoopenclaw:mainfrom
maloqab:fix/slack-reserved-status-command
Closed

fix(slack): rename /status to /agentstatus for Slack slash commands#29032
maloqab wants to merge 3 commits intoopenclaw:mainfrom
maloqab:fix/slack-reserved-status-command

Conversation

@maloqab
Copy link
Copy Markdown
Contributor

@maloqab maloqab commented Feb 27, 2026

Problem

Slack reserves /status as a built-in command name. When users enable native Slack slash commands (commands.native: true) and try to register /status in their Slack app manifest, Slack returns an "invalid name" error that invalidates the entire slash_commands array — meaning no commands can be registered at all.

This makes /status (one of the most commonly used OpenClaw commands) unusable as a native Slack slash command.

Fix

Add a Slack entry to NATIVE_NAME_OVERRIDES that maps statusagentstatus. This uses the same override system that Discord already uses to rename ttsvoice.

When the Slack driver calls listNativeCommandSpecsForConfig() with provider: "slack", the returned command name is agentstatus instead of status. The Bolt handler then registers as /agentstatus, which matches the manifest entry users can safely create.

Changes

  • src/auto-reply/commands-registry.ts — add slack: { status: "agentstatus" } to NATIVE_NAME_OVERRIDES
  • src/auto-reply/commands-registry.test.ts — add test following the existing Discord override test pattern

Context

Slack reserves several command names (/help, /status, /send, /kill, /debug, /commands, etc.) that cannot be registered as custom slash commands. This PR addresses the most impactful one — /status. Other reserved names can be added to the override map as needed in the future.

Users need to register /agentstatus (instead of /status) in their Slack app manifest for this to work.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

This PR fixes a critical Slack integration issue by renaming the status command to agentstatus for native Slack slash commands. The implementation correctly uses the existing NATIVE_NAME_OVERRIDES pattern (already used for Discord's ttsvoice mapping) and includes comprehensive test coverage following the established test pattern.

  • Added Slack entry to NATIVE_NAME_OVERRIDES mapping statusagentstatus in src/auto-reply/commands-registry.ts:126-130
  • Added test case verifying the override behavior in src/auto-reply/commands-registry.test.ts:112-120
  • Clear inline comment explains why this override is necessary (Slack reserves /status as a built-in command)

The fix enables users to register /agentstatus in their Slack app manifest (instead of the reserved /status), making the status command usable with Slack's native slash commands. This is not a breaking change since users were previously unable to register /status at all.

Confidence Score: 5/5

  • This PR is safe to merge with no identified risks
  • The implementation follows an established pattern (Discord's native name override), includes proper test coverage, solves a real Slack API limitation, and has no breaking changes. The fix is minimal, well-documented with inline comments, and the test comprehensively validates the expected behavior.
  • No files require special attention

Last reviewed commit: 52d86d8

Slack reserves /status as a built-in command. Registering it in a Slack
app manifest returns "invalid name" and invalidates the entire
slash_commands array. This adds a Slack provider override using the
existing NATIVE_NAME_OVERRIDES system (same pattern as Discord's
tts → voice rename) so the handler registers as /agentstatus instead.
@vincentkoc vincentkoc force-pushed the fix/slack-reserved-status-command branch from 52d86d8 to 7e6e785 Compare February 27, 2026 18:54
Copy link
Copy Markdown
Member

@vincentkoc vincentkoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed locally after rebasing onto current main.

Validation run:

  • pnpm vitest run src/auto-reply/commands-registry.test.ts src/slack/monitor/slash.test.ts

No functional regressions found in this patch. The Slack-specific native override (status -> agentstatus) is correctly wired through both registration and native-name lookup paths.

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation channel: slack Channel integration: slack labels Feb 27, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14bc59c232

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

slack: {
// Slack reserves /status — registering it returns "invalid name"
// and invalidates the entire slash_commands manifest array.
status: "agentstatus",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid Slack native name collision with skill commands

Renaming the built-in status command to agentstatus for Slack introduces a new native name that is not reserved when skill commands are generated, because listReservedChatSlashCommandNames only collects each command’s nativeName/text aliases (see src/auto-reply/skill-commands.ts), not provider-specific overrides. In Slack environments with both commands.native and commands.nativeSkills enabled, a user skill named agentstatus can now coexist with the built-in status override, producing duplicate /agentstatus entries and making one command impossible to register/route correctly.

Useful? React with 👍 / 👎.

steipete added a commit that referenced this pull request Feb 27, 2026
Land contributor PR #29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
@steipete
Copy link
Copy Markdown
Contributor

Landed on main via commit 8bc80fad4.

What we did:

  • Rebased the PR changes onto latest main on a temp landing branch.
  • Kept the Slack native alias fix (status -> agentstatus) and docs updates.
  • Added extra tests:
    • registry assertion that Slack native lookup no longer resolves status directly
    • Slack slash monitor integration coverage for /agentstatus registration + dispatch mapping to /status
  • Added changelog entry for the Slack native command fix.
  • Ran full gate before landing: pnpm lint && pnpm build && pnpm test (all passing).

Source commit SHAs from this PR:

  • 7e6e78555
  • d4b06c25c
  • 14bc59c23

Thanks @maloqab for PR #29032.

@steipete steipete closed this Feb 27, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Feb 27, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
velvet-shark pushed a commit to lailoo/openclaw that referenced this pull request Feb 27, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
xiexikang pushed a commit to C-clawd/cclawd that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
(cherry picked from commit 7c7c6b6)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
(cherry picked from commit 7c7c6b6)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
(cherry picked from commit 7c7c6b6)
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
venjiang pushed a commit to venjiang/openclaw that referenced this pull request Mar 2, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 15, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
(cherry picked from commit 8bc80fa)
alexey-pelykh added a commit to remoteclaw/remoteclaw that referenced this pull request Mar 15, 2026
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.


(cherry picked from commit 8bc80fa)

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: maloqab <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants