Discord error 160004: A thread has already been created for this message
Last verified against Discord Developer Docs - Opcodes and status codes
A thread has already been created for this messageWhat error 160004 means
You called POST /channels/{channel.id}/messages/{message.id}/threads on a message that already has a thread. Each message can start at most one thread; once it exists, the message is permanently linked to it.
Auto-thread bots (for example "create a thread for every message in #suggestions") see this when two instances of the bot run at once, when a gateway resume replays the same MESSAGE_CREATE, or when a human clicked Create Thread first. The thread you wanted already exists, so nothing is lost.
The existing thread's ID is the same as the message ID, so you can address it directly at /channels/{message.id} without a lookup.
The same limit applies when a person creates the thread from the message in the client. If your bot also handles THREAD_CREATE, it sees that thread and can adopt it instead of creating its own.
What it looks like
{
"message": "A thread has already been created for this message",
"code": 160004
}Why it happens
- Two bot processes or shards handling the same message
- Gateway resume replayed MESSAGE_CREATE and the handler ran twice
- User created the thread manually before the bot
- Retry after a timeout on a request that actually succeeded
How to fix Discord error 160004
- 1Check message.thread (or the message's flags) before creating
- 2On 160004, use the message ID as the thread ID and continue
- 3Deduplicate gateway events by message ID
- 4Make sure only one bot instance handles each guild
- 5Handle THREAD_CREATE and record threads people create so the bot does not try again
How to stop it recurring
Make thread creation idempotent: try to create, and on 160004 fetch the channel with the message ID and carry on. Track processed message IDs for a short window to absorb replays. Thread membership caps are on 30033. Log which path created each thread.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 160006: Maximum number of active threads reachedMaximum number of active threads reached
- 30033: Maximum number of thread participants has been reached (1000)Maximum number of thread participants has been reached (1000)
- 50083: Operation on an archived threadTried to perform an operation on an archived thread, such as editing a message…
- 10008: Unknown messageUnknown message
Error 160004 - quick answers
What does Discord error 160004 mean?
You called POST /channels/{channel.id}/messages/{message.id}/threads on a message that already has a thread. Each message can start at most one thread; once it exists, the message is permanently linked to it.
How do I fix Discord error 160004?
1. Check message.thread (or the message's flags) before creating 2. On 160004, use the message ID as the thread ID and continue 3. Deduplicate gateway events by message ID 4. Make sure only one bot instance handles each guild 5. Handle THREAD_CREATE and record threads people create so the bot does not try again
Should I retry after error 160004?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.