Repository navigation
Description
When a child agent reports a GitHub event, such as a PR review, the parent relays it into the Slack thread. It mentions the reviewer and then talks about them by name in the same message, as if they were someone else. The reviewer is in the thread and reads the reply as written about them, not to them.
This is the same symptom as #2248, on a path the #2248 fix doesn't cover.
What happened
A root conversation started one child agent per PR (getsentry/toolkit#2051–#2057). Each child watched its PR. When the reviewer requested changes or approved, the child reported to the parent, and the parent posted to the thread. The reviewer was in the thread, had asked for the work, and is linked to their GitHub account. The parent's replies looked like this:
@Reviewer @requester Burak requested changes on #2055. One of his two asks is done…
That happened in at least five replies. The right form is "you requested changes on #2055" when addressing the reviewer.
Why it happens
- The PR review notifications refer to the reviewer by GitHub login even when they are the mentioned Slack user #2248 fix only covers Event task input.
peopleTagsinpackages/junior/src/chat/task-input.tsrenders the doer and addsIf you mention <@U…>, write to them as "you"…. The child agent that receives the watch Event sees that rule. - The child then writes its result as free text, using the GitHub login (
BYK requested changes on …), and often adds the mention too. That text reaches the parent as an<agent-result>, with no doer or people metadata. - When the parent writes its reply, it has no rule that ties the login in the result to the Slack user it mentions or to someone present in the thread. The system prompt's
<agent-result>rule (system-prompt-rules.ts:40) only covers status handling. So the parent maps the login to a display name and keeps the child's third-person framing.
Possible fix
This needs a design choice. Options:
- General prompt rule: when a reply mentions or addresses someone, talk to them as "you", and don't also name them in the third person. That covers relays, catch-ups and plain replies, but it's prompt steering rather than structure.
- Carry the doer through the result: when a child's turn was started by an Event with a resolved doer, attach the doer's mention and handles to the
<agent-result>. The parent then renders the same "you" rule thatpeopleTagsgives Event turns. - Both. Option 2 for the event case, option 1 as the baseline.
Add an eval next to subscriptions.eval.ts ("when the person who asked reviews the PR, address them once as you"), with the delivery going through a child agent result instead of a direct watch delivery.
Related
- PR review notifications refer to the reviewer by GitHub login even when they are the mentioned Slack user #2248: the same symptom for direct watch deliveries. Closed; the fix is the
done-by"you" rule. - Child agent work is attributed to whoever last messaged it #2626: child agent work attributed to the wrong person. A different problem in the same relay path.
via @BYK.
--
Activity