You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Child agent work is attributed to whoever last messaged it #2626
When a parent sends a follow-up to an existing child agent with messageAgent, the child's result Turn runs as the Actor of the Turn that sent the message. The parent's later work, including new children it spawns, then runs as that Actor. So a person who only adds a data point to a thread becomes the requester of everything after it, and the person who started the work loses attribution.
Person A started an investigation in a Slack thread. Junior spawned a changes child.
Person B posted a network-tab detail and mentioned Junior. That Turn sent it to the existing changes child with messageAgent (new invocation f865…, Actor = B).
The result of that invocation started a parent Turn as B. That Turn spawned the revert-pr child, which also ran as B.
The PR says via @<B>.. The runtime assigned it to B, and both commits have only B as Co-Authored-By. A shows up only because the parent's task text told the child to run gh api … assignees by hand.
The PR upkeep task also stores B as the requester, so review notifications go to B.
Root cause (high confidence):
withAgentInvocationResultActors (packages/junior/src/chat/agent-invocations/result.ts:493) runs each result as invocation.actor. That comment says this is on purpose, so the parent keeps the authority it had at spawn time.
The messageAgent invocation stores the sender Turn's Actor. So "the Actor that triggered the child" is the last sender, not the spawner.
GitHub attribution, the assignee, and the saved PR requester all come from the single current Actor (resolveGitHubRequester / appendGitHubRequesterAttribution in packages/junior-github/src/tool-support/attribution.ts, and create-pull-request.ts:377). run.actors for the child holds only that one Actor, so commit trailers credit only B.
Related: #2105 lists "results from different Actors" as untested coverage. #2567 states "never from … whoever asked last" for the Actor of a Turn.
Activity