Discord error 160005: Thread is locked
Last verified against Discord Developer Docs - Opcodes and status codes
Thread is lockedWhat error 160005 means
The thread has been locked, and the action you tried is limited to members with Manage Threads. In a locked thread, only those members can unarchive it, and the thread stays read-only for everyone else.
Locking is a moderation step, so 160005 usually means a moderator closed the thread on purpose. Bots that post status updates into ticket or support threads after staff locked them, or that try to unarchive a locked thread to add a user, get this code. The thread_metadata.locked field shows the state.
If the thread is only archived, not locked, the bot can unarchive it with ordinary permissions; that case is 50083.
Locked and archived are separate fields in thread_metadata, so check both. A thread that is both locked and archived needs a member with Manage Threads to reopen it.
What it looks like
{
"message": "Thread is locked",
"code": 160005
}Why it happens
- Moderator locked the thread and the bot lacks Manage Threads
- Bot tries to unarchive a locked thread to post or add members
- Ticket system posts updates to a thread staff has closed
- Bot role lost Manage Threads after a permission change
- The bot treats a locked thread like an archived one. Sending a message unarchives an archived thread automatically, but not a locked one.
How to fix Discord error 160005
- 1Fetch the thread and check thread_metadata.locked
- 2If the bot should manage threads, grant it Manage Threads in the parent channel
- 3Otherwise respect the lock: skip the post or send it to a staff channel
- 4Retry only after a moderator unlocks the thread
- 5Tell the two states apart: if
thread_metadata.archivedis true andlockedis false, a normal message reopens the thread; iflockedis true, only a member with Manage Threads can reopen it.
How to stop it recurring
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 50083: Operation on an archived threadTried to perform an operation on an archived thread, such as editing a message…
- 160006: Maximum number of active threads reachedMaximum number of active threads reached
- 50013: Missing permissionsYou lack permissions to perform that action
- 30033: Maximum number of thread participants has been reached (1000)Maximum number of thread participants has been reached (1000)
Error 160005 - quick answers
What does Discord error 160005 mean?
The thread has been locked, and the action you tried is limited to members with Manage Threads. In a locked thread, only those members can unarchive it, and the thread stays read-only for everyone else. Locking is a moderation step, so 160005 usually means a moderator closed the thread on purpose.
How do I fix Discord error 160005?
1. Fetch the thread and check thread_metadata.locked 2. If the bot should manage threads, grant it Manage Threads in the parent channel 3. Otherwise respect the lock: skip the post or send it to a staff channel 4. Retry only after a moderator unlocks the thread 5. Tell the two states apart: if thread_metadata.archived is true and locked is false, a normal message reopens the thread; if locked is true, only a member with Manage Threads can reopen it.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.