Skip to content

Fix: Tell callers to omit notify and keep the default recipients - #514

Merged
shane-tw merged 1 commit into
mainfrom
fix/notify-omit-default-recipients
Sep 3, 2026
Merged

Fix: Tell callers to omit notify and keep the default recipients#514
shane-tw merged 1 commit into
mainfrom
fix/notify-omit-default-recipients

Conversation

@shane-tw

@shane-tw shane-tw commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The trap

notify is a single value on the wire — true, "ALL", or a comma-separated ID list. There is no additive shape, so a supplied value replaces the default recipients rather than widening them. Asked to comment and let one person know, a client sets notify to that person alone and every follower the default would have notified is dropped.

Nothing reveals it. The response carries no recipient list, projects.Comment has no follower field, and no read path returns one — so the call succeeds identically either way and the mistake is never learnt.

The description advertised the accepted shapes and said nothing about the cost of using one, which reads as an invitation to fill the parameter in.

The change

helpers.NotifySchema now opens by telling the caller to omit it, and names the default it would be replacing:

Who to notify of the new comment. Omit it unless the user named who to notify: the default notifies every follower of the related entity, and a value here replaces that set rather than adding to it, so a narrower one silently drops everyone else who would have been told. Accepts the string "all" …

The wording follows the parameter's existing split: every follower of the related entity for comments, all project members for messages, replies and links — all 8 call sites, since the same trap applies to each.

Omitting the parameter is not the same as omitting the field, which is what makes the advice safe to give: the handlers substitute their own default (1f7c708), where the endpoints left to themselves notify nobody.

Notes

  • TestNotifySchema pins both branches — the advice, the default it names, and that every shape parseNotify coerces is still advertised.
  • Cost: +374 tokens, +0.57% of the tool-definitions block (go run ./cmd/mcp-tokens -base=main), spread over 8 tools.
  • Generated docs are unchanged — they carry tool descriptions, not parameter descriptions.

🤖 Generated with Claude Code

The notify parameter is a single value on the wire, so a supplied one
replaces the default recipients instead of widening them: asked to
comment and let one person know, a client sets notify to that person
alone and every follower the default would have notified is dropped.
Nothing reveals it - the response carries no recipient list, and no read
path returns a comment's followers - so the call looks like it worked.

The description advertised the accepted shapes and nothing about the cost
of using one, which reads as an invitation to fill the parameter in. It
now opens by saying to omit it unless the caller named who to notify, and
names the default it would be replacing: every follower of the related
entity for comments, all project members for messages, replies and links.

Omitting the parameter is not the same as omitting the field, which is
what makes the advice safe to give: the handlers substitute their own
default, where the endpoints left to themselves notify nobody.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shane-tw
shane-tw requested a review from a team as a code owner September 3, 2026 10:49
@shane-tw
shane-tw merged commit 7db9648 into main Sep 3, 2026
4 checks passed
@shane-tw
shane-tw deleted the fix/notify-omit-default-recipients branch September 3, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants