Repository navigation
A local reply leaves out the people the answered message blind copied - #609
Conversation
When HEY's prefill is unavailable or empty, hey reply and the TUI composer fall back to working out recipients locally, and they carried the answered message's Bcc over to the reply. HEY stopped doing that in basecamp/haystack#9169, so a follow-up could reach someone who was blind copied "this once" without anyone seeing it. The fallbacks now leave the Bcc'd people off. They keep them, in Bcc, only when nobody else is left to address: the message went to the sender alone ("To: me, Bcc: the list") or only to blind copied people. The fallback cannot know who is replying, so it treats the sender as the replier. A Bcc-only message written by someone else therefore keeps its Bcc here, where HEY would drop it; the server prefill, the primary path, has the exact answer. Verified: new cases for the plain drop and both whole-audience keeps fail on the old code (the keeps pin existing behaviour); make test and make lint pass.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61659df87d
ℹ️ 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".
There was a problem hiding this comment.
🟡 Changes recommended
The reply help, agent notes, and CLI manual still promise replies to all original recipients without explaining the fallback’s Bcc exclusion, whole-audience exception, or sender-as-replier limitation.
1 open issue
What changed in this PR
Updates local reply recipient selection in the CLI and TUI to omit previously blind-copied recipients, while preserving them when they are the whole audience. Server-provided reply prefills remain unchanged.
Changes:
- Apply the Bcc exclusion and whole-audience exception in both local fallbacks.
- Document the fallback’s sender-as-replier assumption in code comments.
- Add regression cases for ordinary replies and both whole-audience exceptions.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| internal/tui/compose.go | Applies the Bcc rule to TUI reply fallback recipients. |
| internal/tui/compose_test.go | Tests Bcc exclusion and whole-audience retention. |
| internal/cmd/thread_reply.go | Applies the Bcc rule to CLI reply fallback recipients. |
| internal/cmd/thread_reply_test.go | Tests ordinary replies and both Bcc retention exceptions. |
Review effort: Balanced
…for the CLI and the TUI Review finding (Codex, P1): the Bcc exclusion rule and its helpers were written twice, in internal/cmd and internal/tui, and AGENTS.md says to extend internal/mail rather than reimplement HEY's rules in a caller. mail.ReplyRecipientsFor now holds recipientsForReplyTo, keepsBlindCopied and addressesOf; both callers delegate to it. Behaviour is unchanged. Verified with make test and make lint, the existing CLI and TUI cases unchanged, plus a mail-level test of both Bcc outcomes. Rejected: leaving two copies in step by a comment, which is the drift the finding names.
Review finding (Copilot): the help, agent notes and CLI manual promised a reply to everyone the entry addressed, but the fallback now leaves out the people the message blind copied. The help and docs/cli.md now say the fallback drops blind copied people unless they are everyone left to address, and that it takes the sender as the replier. The agent notes describe HEY's prefill, which is unchanged. Verified with make test and make lint. Rejected: editing the agent notes, whose sentence is about HEY's prefill.
There was a problem hiding this comment.
Review completed against the latest diff
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Summary at 6c8f3bd. Codex P1 (duplicated rule): fixed, now |

Context
When
hey replyor the TUI composer cannot get HEY's own reply prefill (it is unavailable or comes back empty), they work out the recipients locally. That local answer copied the answered message's Bcc'd people onto the reply, so a follow-up could reach someone who was blind copied "this once" without the others seeing. HEY stopped doing this in basecamp/haystack#9169, and every HEY client is meant to behave the same way (Jeremy's decision).Change
recipientsForReplyAddressedininternal/cmd/thread_reply.go,recipientsForReplyToininternal/tui/compose.go) leave the Bcc'd people off a reply.Verification
make testandmake lintpass.Alternatives
Follows basecamp/haystack#9169.
Summary by cubic
Stops the local reply fallbacks in
hey replyand the TUI composer from carrying the answered message's Bcc'd people onto the reply, matching HEY's behavior from haystack#9169.mail.ReplyRecipientsFor; both callers delegate to it instead of reimplementing HEY's logic ininternal/cmdandinternal/tui.Written for commit 6c8f3bd. Summary will update on new commits.