Problem
The messages table has a deleted_from_source_at column. Sync sets this column when a message leaves the mail server.
show-message does not show this column. The text output does not show it. The --json output does not show it.
A draft message keeps the DRAFT label after the user sends it or deletes it. The row stays in the archive. Thus show-message shows Labels: DRAFT for these three different conditions:
- The draft is open on the mail server.
- The user sent the draft.
- The user deleted the draft.
The archive knows the difference. The command does not show it.
Example
Sync marked message 41589 as deleted at 18:19 on 17 Aug 2026. The user sent the message at 18:16. Sync was correct.
show-message 41589 gives this output:
Subject: Re: <subject>
Date: Mon, 17 Aug 2026 18:11:25 UTC
Labels: DRAFT
show-message 41589 --json gives these keys:
attachments, bcc, body_html, body_text, cc, conversation_id, from,
has_attachments, id, labels, sent_at, size_estimate, snippet,
source_conversation_id, source_message_id, subject, to
A SQL query gives the correct condition:
SELECT labels, deleted_from_source_at FROM v_messages WHERE id = 41589;
-- ["DRAFT"] 2026-08-17T18:19:46Z
Effect
An operator reads Labels: DRAFT and makes the wrong conclusion. The operator reports that the message is open, or that the user did not send the message.
The risk is high for AI agents. An agent uses show-message as the primary read command. The agent does not query the column, because the command output looks complete.
Suggested solution
- Add
deleted_from_source_at to the --json output of show-message.
- Show a line in the text output when the column has a value. For example:
Labels: DRAFT
Deleted from source: 2026-08-17T18:19:46Z
Do not show the line when the column is empty. This keeps the usual output unchanged.
Make the same change to search, if the result rows show labels.
Environment
- msgvault 0.19.3, Homebrew bottle, macOS 15 arm64
- Gmail source
Problem
The
messagestable has adeleted_from_source_atcolumn. Sync sets this column when a message leaves the mail server.show-messagedoes not show this column. The text output does not show it. The--jsonoutput does not show it.A draft message keeps the
DRAFTlabel after the user sends it or deletes it. The row stays in the archive. Thusshow-messageshowsLabels: DRAFTfor these three different conditions:The archive knows the difference. The command does not show it.
Example
Sync marked message 41589 as deleted at 18:19 on 17 Aug 2026. The user sent the message at 18:16. Sync was correct.
show-message 41589gives this output:show-message 41589 --jsongives these keys:A SQL query gives the correct condition:
Effect
An operator reads
Labels: DRAFTand makes the wrong conclusion. The operator reports that the message is open, or that the user did not send the message.The risk is high for AI agents. An agent uses
show-messageas the primary read command. The agent does not query the column, because the command output looks complete.Suggested solution
deleted_from_source_atto the--jsonoutput ofshow-message.Do not show the line when the column is empty. This keeps the usual output unchanged.
Make the same change to
search, if the result rows show labels.Environment