feat(gmail): add first-class reply commands#803
Conversation
|
@codex review |
|
@clawsweeper review Please review the first-class Gmail reply/reply-all semantics, recipient placement and removal behavior, Gmail thread matching, RFC reply headers, multipart/related CID preservation, forward compatibility changes, and regression coverage. Local |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed June 14, 2026, 1:59 AM ET / 05:59 UTC. Summary Reproducibility: not applicable. this is a feature PR rather than a current-main bug report. The changed behavior is source-reviewable and the PR body reports live Gmail raw-message verification for reply and reply-all. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land only after final checks are green and maintainers accept the compatibility-visible forward-threading and recipient-routing semantics. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a feature PR rather than a current-main bug report. The changed behavior is source-reviewable and the PR body reports live Gmail raw-message verification for reply and reply-all. Is this the best way to solve the issue? Yes, subject to maintainer acceptance of the compatibility change: first-class reply commands are a narrower, more maintainable solution than making users rebuild reply MIME through lower-level AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d4dae4b41af. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review Maintainer decision: accept the intentional A forward changes the subject to Forwards should create a separate conversation while preserving forwarded content, inline CID resources, and ordinary attachments. No compatibility flag is needed. First-class Local |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c743c66aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@clawsweeper re-review The blocking HTML-only reply finding is fixed in a7196ce. The reply composer derives visible plain text from HTML replies and HTML-only originals while retaining image-only replies as HTML-only. Focused regression coverage, full |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
There was a problem hiding this comment.
💡 Codex Review
gogcli/docs/gmail-workflows.md
Line 54 in a7196ce
The Gmail send command exposes --body/--body-file, not --text (see GmailSendCmd.Body in internal/cmd/gmail_send.go), so this new guardrail example fails as soon as users copy it instead of demonstrating no-send behavior. Please change the example to use --body body.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…mands # Conflicts: # CHANGELOG.md # internal/cmd/gmail_drafts.go # internal/cmd/gmail_forward.go # internal/mailmime/mime.go # internal/slidesmarkdown/markdown.go
|
@codex review Both findings from the previous review are fixed at The branch is refreshed against current |
|
@clawsweeper re-review The branch is refreshed against current Full |
|
@clawsweeper re-review Final head |
|
@codex review Final head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2abe9fde3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review The URL-scheme finding is fixed at |
|
@clawsweeper re-review The URL-scheme finding is fixed at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review The recipient-safety finding is fixed at |
|
@clawsweeper re-review The recipient-safety finding is fixed at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…mands # Conflicts: # internal/cmd/gmail_forward.go # internal/cmd/gmail_reply.go
|
@codex review Final mergeable head |
|
@clawsweeper re-review Final mergeable head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
gmail replyandgmail reply-allcommandsRe:subjects and quote the original message by default--to,--cc, and--bccadditive placement/move operations, with repeatable--removemultipart/relatedinstead of sending broken inline imagesgogagent skillWhy
The Gmail API accepts complete RFC MIME messages through
messages.send; it does not provide reply or reply-all methods. The previous lower-level send flags exposed MIME, subject, quote, recipient, display-name, and inline-resource details to callers. That made normal email behavior fragile for both humans and agents.These commands move that behavior into a stable CLI primitive with Gmail-like defaults.
Official contracts used:
Compatibility
gmail send --reply-to-message-idremains available as the lower-level composition path and now inherits the original subject when--subjectis omitted.gmail sendretain replacement semantics; first-class reply commands provide additive/move semantics.threadIdor RFC reply headers because their changedFwd:subject cannot satisfy Gmail's explicit thread-matching contract.Validation
make cigmail reply, and verified the stored raw message had the same thread, inheritedRe:subject, correct To, matchingIn-Reply-ToandReferences, reply body, and quoted original--no-quote, and confirmed Gmail retained the original thread