You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(platform): delete chat attachments and agent files from the storage list #5303
Split off #5267 by the agent working it (board task TALE-360).
#5267 adds Settings › Usage › Storage › View files: a list of every file a person uploaded that counts toward their storage limit, largest first, with where each file lives. It offers Delete only for a document (in Knowledge, or in a project the person can open that is not archived), through the document delete that Knowledge and a project's Files tab already use.
A chat attachment, a file an agent made, a task run's file and any other file have no delete of their own: each keeps counting until what holds it is deleted and Trash purges it. This issue carries the rest of #5267, deleting such files from the storage list.
Proposed
Delete on a chat attachment, a file an agent made or another file in the storage list.
What a deleted attachment leaves behind: its message says a file was attached and has been deleted, rather than showing a broken link.
The same refusals as a document delete (a legal hold, a record, retention), with their reason.
Done when
A person can delete each file in the storage list, or the list says why they may not.
The meter goes down after the delete.
Docs (en, de, fr) and the settings manual suite cover it.
Rule. The storage list deletes every listed file that is not a document through one file delete: the existing DELETE /files/:fileId, upgraded rather than copied. Documents keep the document delete.
In one transaction, a delete:
removes the file's row;
in every message of the file's chat, including edit and regenerate siblings, turns each reference to the file into a tombstone that keeps its name and type but no longer points at the file. This covers the person's attachments and the files the assistant made (the reply's file and its tool result);
writes the audit entry;
queues the file's release as a durable, retried job, so its search entries and its bytes go once nothing else holds them.
The meter drops at once, because it counts file rows.
A delete is refused, with a code and a sentence, when:
a legal hold applies: an org hold, or a custodian hold on the uploader (LEGAL_HOLD_ACTIVE). An upload attached to nothing yet stays deletable.
the file's chat is in Trash (FILE_IN_TRASH).
the chat's project is archived (PROJECT_ARCHIVED).
the file is a product's image (FILE_BOUND_TO_PRODUCT).
a task lists the file (FILE_HELD_BY_TASK).
a queued or failed outgoing email lists the file (FILE_HELD_BY_PENDING_EMAIL).
a document, or another file record, holds the same content (FILE_HELD_BY_DOCUMENT).
a message in another chat lists the file (FILE_HELD_ELSEWHERE).
a reply is running anywhere in the chat (CHAT_REPLY_RUNNING, retry afterwards).
The list works out these reasons for each page ahead of time and shows Delete or the reason. The checks run again at delete time.
Answers
Task-run files: not listed. A task's deliverable stops counting toward anyone when the task claims it, and deleting it belongs to the task.
What a deleted file leaves: the message shows the file's chip as "name — deleted", with no link or preview. This holds for the person's attachments and for files the assistant made. The assistant sees "[attachment deleted: name]" or "[file deleted: name]" in later turns. Readers of a shared chat see the same.
Records: this protection applies only to documents, so it does not apply here.
Retention: not a refusal. A retention policy only removes data sooner.
Meter: goes down right after the delete. The bytes follow through a release job that is retried until it succeeds.
Audit: written with the delete, because that is when the file disappears for the person.
Who: the uploader, from the list. Owners and admins keep the delete they already have on the route, under the same refusals.
Rationale. Today's file delete keeps the bytes whenever anything still names them, and it does not check legal holds. The refusals here are exactly the holders that would keep the bytes, apart from the file's own chat, whose references become tombstones. So a successful delete always frees the storage, and the meter stays honest. The release is queued in the same transaction because no sweep would ever find bytes that a failed after-commit delete left behind. The assistant's own files ride its replies, so the tombstone covers those too, not only the person's attachments.
Implementation units (base: release/0.6)
Show a deleted chat file as a tombstone (M): the deleted flag on attachment and artifact parts, the chip, the text the assistant sees, the export, the locales and a chat manual box.
Delete a file with its chat references, behind holds and holders (L): the upgraded delete with its refusals, the tombstones in the chat lineage, the audit entry and the durable release in one transaction, a batch refusal helper, files spec rules FILE-R11 to FILE-R13, and integration tests on Postgres.
Delete chat attachments and agent files from the storage list (M): refusal reasons for each row in the list, Delete with a confirm dialog, the meter and list refresh, the DOC-R14 update, docs in en, de and fr, the locales, and settings manual boxes.
Cross-issue amendments (decisions taken together with #4208, #5298, #4208):
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Rule. The storage list deletes every listed file that is not a document through one file delete: the existing
DELETE /files/:fileId, upgraded rather than copied. Documents keep the document delete.In one transaction, a delete:
The meter drops at once, because it counts file rows.
A delete is refused, with a code and a sentence, when:
LEGAL_HOLD_ACTIVE). An upload attached to nothing yet stays deletable.FILE_IN_TRASH).PROJECT_ARCHIVED).FILE_BOUND_TO_PRODUCT).FILE_HELD_BY_TASK).FILE_HELD_BY_PENDING_EMAIL).FILE_HELD_BY_DOCUMENT).FILE_HELD_ELSEWHERE).CHAT_REPLY_RUNNING, retry afterwards).The list works out these reasons for each page ahead of time and shows Delete or the reason. The checks run again at delete time.
Answers
Rationale. Today's file delete keeps the bytes whenever anything still names them, and it does not check legal holds. The refusals here are exactly the holders that would keep the bytes, apart from the file's own chat, whose references become tombstones. So a successful delete always frees the storage, and the meter stays honest. The release is queued in the same transaction because no sweep would ever find bytes that a failed after-commit delete left behind. The assistant's own files ride its replies, so the tombstone covers those too, not only the person's attachments.
Implementation units (base: release/0.6)
Cross-issue amendments (decisions taken together with #4208, #5298, #4208):