Fix Log entry

Local Slack integration for Qwen Code AI

4/11/2026

The Complaint

I wanted a Slack-based coding assistant that runs on my own computer, not on a hosted service or behind a public webhook.

Why It’s Broken

Most Slack AI bots require a public URL, a server, or a tunnel service. That makes the setup heavier and adds ongoing hosting or network configuration costs.

The Fix

Use Qwen Code with a local Python bot and Slack Socket Mode.

  • Install Node.js and Qwen Code locally
  • Log in to Qwen to get free credits
  • Install Python and the bot dependencies
  • Create a Slack app with Socket Mode enabled
  • Configure SLACK_APP_TOKEN, SLACK_BOT_TOKEN, and QWEN_WORK_DIR
  • Run python3 bot.py on the machine that hosts the bot

With this setup, Slack messages travel over a WebSocket to the local bot. The bot sends prompts to Qwen Code and replies back in Slack threads.

What’s Next

  • Keep the bot running in a terminal session or process manager.
  • Re-run qwen if Qwen auth expires.
  • Update the Slack app permissions when Slack or Qwen adds new API requirements.

Related

For the full setup guide, see the blog post: Run Qwen Code AI from Slack on your own machine