Troubleshooting
Start with the logs: the bot writes one JSON line per event, and every problem below shows up there.
The container exits right after starting
The configuration is incomplete. The logs list each problem and what to do:
{"level":"error","msg":"config","problem":"SLACK_APP_TOKEN should start with xapp- (an App-Level Token with connections:write)."}Fix the variables and start it again. Reference: Configuration.
If it says "Slack rejected SLACK_BOT_TOKEN", the token is wrong or the app was uninstalled: copy the Bot User OAuth Token again from OAuth & Permissions.
The bot doesn't answer a mention
- Is it running? The logs show
{"msg":"ready",...}and/healthzreturnsok. - Is it in the channel? Run
/invite @twd-designin the channel. - Did you change scopes or events? Reinstall the app: Install App → Reinstall to Workspace.
- Is it a DM? The bot works in channels only.
- HTTP mode: is the Request URL reachable from the internet, and is
SLACK_SIGNING_SECRETright?
If the logs show nothing at all when you mention it, Slack isn't delivering the event: it's one of 2, 3 or 5.
It doesn't answer a reply in the thread
It only answers when mentioned, also in a thread it is already in: @twd-design and on mobile?. That keeps it out of conversations between people, or with other bots in the same thread. It still reads the replies that didn't mention it when it answers.
"I can't read owner/repo: the GitHub App isn't installed there"
The App isn't installed on that repo. Follow the link in the message, or on the App's page: Install App → your org → Configure → add the repo. If your org doesn't appear, the App was created in a personal account with "Only on this account": create it in the organization instead. See Create the GitHub App.
It ignores my design
The bot reads design/DESIGN.md from the last GitHub link pasted in the thread. Check that:
- the thread contains the repo link (any link to the repo works, e.g.
https://github.com/acme/web), - the file is exactly at
design/DESIGN.mdon the default branch, GITHUB_APP_IDandGITHUB_PRIVATE_KEYare set (thereadylog line shows"github":true).
When the repo has no DESIGN.md, the bot says it used a neutral design.
Something doesn't respond in Slack's preview
Slack shows the .html in a sandboxed preview that blocks a few browser features (popups, alert(), network requests, external images). Prototypes are built to work there, forms included. If something still doesn't respond, download the file and open it in your browser: it works the same and has no limits.
"Something failed: …" in the thread
The turn failed, usually at the model provider. The message and the turn failed log line say why. The usual causes:
- a wrong
MODELid or a model your key can't use, - an invalid or out-of-credit API key,
- the provider's rate limits.
A turn takes minutes
- Check
THINKINGis noton. - First versions take 40–70 s with a fast model; changes 10–25 s. Much slower usually means a slow model or provider. Compare with the
msfield in theturnlog lines, and see Choose a model.
"This thread hit the 15-turn limit"
Start a new thread. You can raise the limit with MAX_TURNS_PER_THREAD.
WebSocket error lines in the logs
In Socket Mode, Slack closes and reopens connections from time to time. The client reconnects by itself. It is only a problem if the bot stops answering, in which case restart it and check outbound access to wss://*.slack.com.