fix(slack): rename /status to /agentstatus for Slack slash commands#29032
fix(slack): rename /status to /agentstatus for Slack slash commands#29032maloqab wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a critical Slack integration issue by renaming the
The fix enables users to register Confidence Score: 5/5
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.
52d86d8 to
7e6e785
Compare
vincentkoc
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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", |
There was a problem hiding this comment.
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 👍 / 👎.
Land contributor PR #29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
|
Landed on What we did:
Source commit SHAs from this PR:
|
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
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)
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)
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)
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry. Co-authored-by: maloqab <[email protected]>
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)
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]>
Problem
Slack reserves
/statusas a built-in command name. When users enable native Slack slash commands (commands.native: true) and try to register/statusin their Slack app manifest, Slack returns an "invalid name" error that invalidates the entireslash_commandsarray — 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_OVERRIDESthat mapsstatus→agentstatus. This uses the same override system that Discord already uses to renametts→voice.When the Slack driver calls
listNativeCommandSpecsForConfig()withprovider: "slack", the returned command name isagentstatusinstead ofstatus. The Bolt handler then registers as/agentstatus, which matches the manifest entry users can safely create.Changes
src/auto-reply/commands-registry.ts— addslack: { status: "agentstatus" }toNATIVE_NAME_OVERRIDESsrc/auto-reply/commands-registry.test.ts— add test following the existing Discord override test patternContext
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.