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
Enforce one agent session per PR branch: require a claim before commit/push #4155
A cloud session (session_01BvPx94rPKXAKktp5sgykUh, committing as Douglas Ezra Morrison) pushed fixes for the same findings between 16:04 and 16:55 PDT, also without a claim comment.
The local session found the collision only through the git ls-remote check it ran before pushing. By then, the cloud session's "restore" commit on #4134 (468eef5e) had left memories/preferences.md at 706 lines instead of 1177, dropping 16 sections. The local session stood down and posted its findings (comment).
Maintainer directive: different agent sessions must not work on the same branch at the same time.
Why the existing rule did not prevent it
shared/workflow/claim-pr.md and the claim-pr skill say to claim before working, but nothing enforces it. Both sessions skipped the claim. ListAgents cannot see cloud sessions, so the local session had no other way to discover the peer.
Proposed mechanism
A local PreToolUse hook on git commit and git push in a checkout whose branch has an open PR. It denies the call unless the PR has a claim comment from this session that is newer than any other session's claim. Before a push, it also warns when the branch has pushes from another actor or session since this session's claim; the forge activity endpoint provides that check. The hook would have stopped the local session at its first commit.
A server-side half, because hooks are inert in remote and web sessions (Every PreToolUse and Stop hook is inert in remote/web sessions: the plugin is never installed #2004). One option is a check run or bot that flags a push to a PR branch when the latest claim comment names a different session. The other is to make the cloud agent's own instructions read the claim comments before its first push.
Out of scope here: the #4134 content loss itself, which is reported on that PR.
What happened (2026-09-30, Pacific)
Two agent sessions worked the same three PR branches at the same time, and neither one claimed them:
gia mwc daytbsession committed fixes for ums: lintr exclusions, probability notation, and LaTeX macro gotchas #4132, ums: probability notation macros and cross-repo concept anchor placement #4134 and ums: document QUARTO_R and reticulate py binding timing in quarto #4138 in local worktrees, without a claim comment.session_01BvPx94rPKXAKktp5sgykUh, committing as Douglas Ezra Morrison) pushed fixes for the same findings between 16:04 and 16:55 PDT, also without a claim comment.The local session found the collision only through the
git ls-remotecheck it ran before pushing. By then, the cloud session's "restore" commit on #4134 (468eef5e) had leftmemories/preferences.mdat 706 lines instead of 1177, dropping 16 sections. The local session stood down and posted its findings (comment).Maintainer directive: different agent sessions must not work on the same branch at the same time.
Why the existing rule did not prevent it
shared/workflow/claim-pr.mdand theclaim-prskill say to claim before working, but nothing enforces it. Both sessions skipped the claim.ListAgentscannot see cloud sessions, so the local session had no other way to discover the peer.Proposed mechanism
git commitandgit pushin a checkout whose branch has an open PR. It denies the call unless the PR has a claim comment from this session that is newer than any other session's claim. Before a push, it also warns when the branch has pushes from another actor or session since this session's claim; the forge activity endpoint provides that check. The hook would have stopped the local session at its first commit.Out of scope here: the #4134 content loss itself, which is reported on that PR.