Slack Error: 'edit_window_closed' — Cause, Fix, and Troubleshooting Guide
Fix the Slack edit_window_closed error: chat.update was called after the workspace's message-edit window. Post a new message instead of editing an old one.
- #slack
- #api
- #troubleshooting
- #errors
Stuck on this Slack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
edit_window_closed is returned by chat.update when the workspace’s message-editing time window has passed for the target message. Some workspaces restrict how long a message can be edited; once that window closes, updates are rejected.
{
"ok": false,
"error": "edit_window_closed"
}
Symptoms
chat.updateworks on recent messages but fails on older ones.- Long-lived “status” messages that a bot keeps updating suddenly stop accepting edits.
- The failure correlates with message age, not content.
Common Root Causes
1. Workspace edit-window policy
An admin limited how long messages can be edited. Bot messages are subject to the same window, so old messages become read-only.
2. Editing a stale status/dashboard message
A bot updating a single message for hours or days eventually exceeds the window.
3. Retention or archival boundaries
Messages near a retention edge can become non-editable.
How to diagnose
Reproduce against an old vs recent ts:
# Old message: fails
curl -s -X POST https://slack.com/api/chat.update \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel":"C0123456789","ts":"1700000000.000100","text":"updated status"}'
{"ok": false, "error": "edit_window_closed"}
A fresh message posted seconds ago updates fine, confirming the window — not the payload — is the issue.
Fixes
- Post a new message instead of editing an old one when the window has closed; optionally delete/supersede the stale one.
- Refresh your anchor message periodically: for long-running status displays, repost a new anchor before the edit window would expire and track the new
ts. - Check the workspace policy with an admin if you need a longer edit window for legitimate ops dashboards.
What to watch out for
edit_window_closedis different fromcant_update_message(you can’t edit that message at all — e.g. it wasn’t posted by this app) andmessage_not_found(badts/channel).- Design long-lived status bots to roll their anchor message rather than assuming they can edit the same
tsforever. - Keep the current anchor
tsin durable storage so a restart doesn’t try to edit an expired message.
Related
- Slack Error: ‘cant_update_message’
- Slack Error: ‘message_not_found’
- Slack Block Kit message design for ops
Fixed it? Get 500 Slack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.