-
Notifications
You must be signed in to change notification settings - Fork 600
gmail drafts create/update: add --thread-id for parity with gmail send #673
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
gog gmail sendaccepts--thread-id("Reply within a Gmail thread (uses latest message for headers)"), butgog gmail drafts createandgmail drafts updatedo not — they only accept--reply-to-message-id. There's no thread-aware reply path when composing a draft.Why it matters
Callers who know the thread they want to reply to (but not the specific latest message id) have nowhere to put it. Passing a thread id into
--reply-to-message-idproduces a draft that lands in the thread via subject/participant fallback but is not anchored to the parent's RFC822Message-Id— soIn-Reply-To/Referencesare wrong and Gmail doesn't render it as a clean reply. It fails silently (no error), surfacing only when a human opens the draft.Thread ids and message ids are both 16-hex strings, so this mix-up is easy and undetectable from the value alone.
Proposal
Add
--thread-idtoGmailDraftsCreateCmdandGmailDraftsUpdateCmd, mirroringgmail send:In-Reply-To/Referencesfrom itsMessage-Id(same helpersendalready uses).--reply-to-message-idand--thread-idare mutually exclusive (matchsend'suse only one of …guard).Repro
gmail thread geta multi-message thread; note the latest message's top-levelidvs itsheadersMessage-Id.gmail drafts create … --reply-to-message-id <THREAD_ID>.In-Reply-Tois not the latest message's RFC822Message-Id.gmail drafts create … --thread-id <THREAD_ID>anchors to the latest message, exactly likegmail send --thread-id.(Reported via the gogcli-mcp wrapper; the wrapper will resolve thread→latest-message client-side in the interim, but native
--thread-idis the correct home for this.)