hey reply: override recipients (--to/--cc) without losing the thread

Open
#463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start by tracing the hey reply entry point and compare it with hey compose --thread-id and hey thread read --json, which the issue identifies as related paths. Done means reply accepts recipient overrides and --replace-recipients, supports --dry-run --json without sending, and preserves the thread id, topic, References, and In-Reply-To.

Written by the indexing model from the issue text.

Description

Context

Agents often need to reply in-thread to an address that is not what HEY would pick from the last message — especially with alias / reverse-alias forwards (plus-addressing), ticket systems, and “noreply” envelopes where the human address lives elsewhere.

hey compose --thread-id can approximate this but is easy to get wrong and still isn’t a first-class reply path. After v1.6.0, agents can see the right address (received_via, recipients in hey thread read --json) but still can’t target it on hey reply.

Related: #446 (broader agent ask; this issue splits out the highest-priority remaining item), #431 (envelope visibility — addressed in 1.6.0 via received_via).

No account-specific details below — capability only.


Ask

Add recipient overrides on reply that keep threading:

hey reply <thread-id> --to person@example.com -m "..."
hey reply <thread-id> --to a@x.com --cc b@y.com -m "..."
hey reply <thread-id> --to person@example.com --replace-recipients -m "..."
hey reply <thread-id> --to person@example.com --dry-run --json
Behavior
  1. --to / --cc / --bcc (repeatable or comma-separated — either is fine if documented)
  2. --replace-recipients — when set, overrides replace HEY’s resolved reply recipients instead of merging (recommended default for agent use: replace To at least)
  3. --dry-run — print resolved From / To / Cc / Bcc / thread id as JSON; do not send
  4. Must remain a reply (same topic / References / In-Reply-To), not a new compose
Out of scope
  • Connecting SMTP send-as addresses (see #454)
  • Bulk trash / sweep filters / body hydration (covered or tracked elsewhere)
  • Auto-detecting a “suggested reply-to” from body text (nice later; not required here)

Why

1.6.0 gave agents the data (received_via). This gives them the action. Together they remove the main footgun in automated alias-forwarded support/seller mail.


Environment

  • hey 1.6.0
  • Primary interface: --json from agents/automation
Dominant language
Go
Stars
376
Forks
44
Avg merge
1d 5h
Merged PRs (30d)
130

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from basecamp/hey-cli

All issues in basecamp/hey-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.