Check which credential failed
The app-level token opens the Socket Mode connection. It starts with xapp- and needs connections:write. The bot token starts with xoxb- and comes from the installation in the workspace you are testing. Save them under SLACK_APP_TOKEN e SLACK_BOT_TOKEN and restart after changes.
If the process exits before connecting, inspect Console for a missing package or an authentication error. Verify both tokens and the matching app in the setup guide.
Check whether the app received the mention
With the socket connected, enable Event Subscriptions and add app_mention under bot events. Use a channel where the app is a member and select the app in Slack’s mention picker. Add a temporary log line inside the handler with the event type, keeping workspace content and tokens out of logs.
If you have a local copy running on the same app, stop it while testing. Slack can distribute payloads across its open connections. Slack’s Socket Mode connection behavior.
Check permission to post the threaded reply
If the handler runs and posting fails, confirm the installed bot has chat:write and is a member of that channel. Reinstall the app after changing scopes. Open the thread under your mention to see the reply from the example. Slack’s app_mention event reference.