Repository navigation
Delete a chat - #36
Merged
Merged
Conversation
A conversation, once created, was permanent -- Resolved is a lifecycle state, not a disposal, so every mistaken chat stayed in the list forever. DeleteChat archives the thread through Threads, then marks the chat record deleted. That order matters: if the second step fails the chat is still listed but frozen and a retry closes the gap, where the reverse would leave a chat hidden from its participants that agents keep writing into. Deleting an already-deleted chat reports success, so a client retrying after a timeout does not see a failure for work that landed. A deleted chat drops out of GetChats, and UpdateChat and GetMessages resolve it as NOT_FOUND -- the GetMessages refusal is how a client holding a stale link learns the conversation is gone. It is not an access boundary: the messages stay in Threads and the Console still finds the archived thread. Authorization is delegated to Threads.ArchiveThread, which already admits exactly the identities the product calls for -- any participant, or an organization owner. See agynio/architecture: changes/2026-08-13-chat-deletion.md
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
DeleteChat: archives the thread through Threads, then marks the chat record deleted (that order, so a half-failure leaves a visible-but-frozen chat rather than a hidden one agents keep writing into). Idempotent.A deleted chat drops out of
GetChats;UpdateChatandGetMessagesresolve it asNOT_FOUND. Authorization is delegated toThreads.ArchiveThread— any participant, or an organization owner.Migration
0003addsdeleted_atand narrows the list index to live rows.Spec: changes/2026-08-13-chat-deletion.md · needs agynio/api#189 (merged)