Repository navigation
Description
In a long Slack thread where a parent run coordinated 8+ child agents, Guardian kept asking before child agents edited the title, body, or draft state of PRs that Junior itself had opened for the user's request. One PR description needed four review-desk approvals. From about 30 minutes into the thread, Guardian could no longer see the message that asked for the work.
Observed (Nov 5, sentry/junior spans, gen_ai.execute_tool, app.guardian.decision)
- 18:00 UTC: opening message: "determine if there is MCP metadata missing…". 18:06: the user's second message: "knock them out… put up PRs for each separate change".
- 18:29–18:32: three
github_updatePullRequestdraft conversions on Junior's own PRs gotask. - 19:03:29: a feat(tools): Return structured output from get_latest_base_snapshot toolkit#1984 body update got
ask(trace747fa51fc3d447988df65821bb3eed15). - 19:14:42 and 19:16:10: the fix(mcp): Report the shipped version in stdio serverInfo and User-Agent toolkit#1994 body update got
ask, withuserAuthorization: unknown. That was after the review-desk answer "Approve for the whole effort" (19:04) to "OK for agents to open/update the MCP metadata PRs?". The reasons were "a write not requested in the current actor's user instructions" and "the root instructions contain no user authorization for that update" (traces8e4ce6c0861446c488e159d4e521a75d,b0672528949340ba811edbf731fc5b13). - 19:20:55: the same edit got
allow,userAuthorization: high, after a second answer, "Yes, update it" (tracefcc8d9eae2d543bbbcc1871ea95f8326). - 19:21:30: a body update on feat(mcp): Keep get_sentry_resource loaded in Claude Code toolkit#1989 by another child agent got
allowwith no approval card (trace5a95a1f02f2b4fabbfcb8b2a7b1b1248). - 19:29:10: the title and body update got
ask. Reason: "the visible user intent only asks to determine whether MCP metadata is missing" (tracec35c56d1fb304c14a5f4f83d6bbef15a). - 19:36:54: the same edit got
askagain, after the third answer, "Title and description" (19:35). Reason: "materially equivalent to the previously rejected PR-metadata write, and no authorizing user message is visible" (traceec76247c29db443c8b6c525b74c02deb). A fourth card followed.
Root cause (verified)
readRootConversationreads only the newestMAX_ROOT_MESSAGE_EVENTS = 64messageandmessage_updatedevents (packages/junior/src/chat/agent-invocations/root-conversation.ts:43,:229-232). It pins only the opening message (:253).- Each child result in this thread wrote one
messageevent and twomessage_updatedevents. Each user message wrote onemessageevent and onemessage_updatedevent. The two I read (seq 169/171) had the same text, so amessage_updatedcan take a slot without adding content. These events come fromappendConversationMessages, which writes one on any change to the stored message (chat/conversations/messages.ts:127-147). - In the root event log, the 18:06 "knock them out" message had left the page at every blocked review from 19:03 on. The first event on each page was seq 171, 353, 371, 616 and 736, and that message is seq 113. Only 70 message events existed at 19:03. Guardian saw the pinned "determine if…" message as the whole request, which matches the 19:29 reason text.
Contributing (inference)
- A review-desk answer reaches the root as only the item title, the field label and the chosen option (
chat/review-items/messages.ts:58-66,chat/tools/runtime/user-input-request.ts:223-238). The question text and the named action are not in it. UnderCHILD_AGENT_RULES(chat/guardian/reviewer.ts:45-54), the reviewer may read "Approve for the whole effort" or "Title and description" as a bare answer to text the parent wrote. That fitsuserAuthorization: unknownafter 19:04 and 19:35, buthighafter 19:20. - No core fact tells Guardian that Junior created the PR. The upkeep exemption (
chat/guardian/policy.ts:164, alsodifferent_changeat:48) depends on the reviewer finding the creation in bounded child evidence. The fix(mcp): Report the shipped version in stdio serverInfo and User-Agent toolkit#1994 child's history compacted between 19:14 and 19:16 (history_version 1 → 2). - The repeat
askat 19:36 is theunresolved_prior_askpattern from Guardian ignores later approvals in child agent runs #2450. Here it combined with the root window above. - Draft conversions are
different_changeby policy (policy.ts:164), so those three asks were by design.
Related: #2450 (a later approval does not clear an earlier ask) and #2438 (Guardian asks before routine upkeep on PRs that Junior created).
Expected (reported by the user): Junior should not need approval to keep its own PRs up to date inside work that the user already approved. A review-desk answer should count as approval every time. A fresh, explicit approval should clear an earlier ask.
Proposed in discussion
- Always keep every authorizing root
user:message, at least the ones that started or widened the work, and not only the opener. Or leave outmessage_updatedevents when the text did not change, so they do not use the 64 slots. - Put the question and the action into the review-desk answer message that goes to the root.
- Pass a core fact that the current work created the resource, so upkeep does not depend on evidence that compaction can remove.
via @dcramer.
--
Activity
sentry-junior commentedon Nov 5, 2026
Working on this. #2769 fixes the root message window and adds the question to review desk answers. The created-resource core fact and #2450 are still open.
sentry-junior commentedon Nov 23, 2026
Closing as superseded by the Guardian redesign: intent in #4139, technical proposal in #4140. This issue's concern is covered there.