Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/memory/MEMORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Keep this file under 200 lines — anything longer is content bloat, not memory.
- [learnings/sandbox-cant-clone-private-repo](learnings/2026-05-26-sandbox-cant-clone-private-repo.md) — Don't `git clone` from sandbox bash; the `github_repository` resource is auth'd, raw `git clone` is not
- [learnings/github-mcp-strips-html-comments](learnings/2026-05-26-github-mcp-strips-html-comments.md) — `update_pull_request` silently strips `<!-- ... -->` from PR bodies; session-id marker can't be set by agent (ENG-25)
- [learnings/recheck-open-prs-at-pr-open](learnings/2026-05-26-recheck-open-prs-at-pr-open.md) — session-start grep is insufficient; re-grep `list_pull_requests` right before `create_pull_request` to catch parallel-session races (PR #18 vs #20 ENG-25)
- [learnings/closed-pr-receives-review-after-close](learnings/2026-05-26-closed-pr-receives-review-after-close.md) — Closed PR can still get a REQUEST_CHANGES review seconds after dup-close; don't reopen, surface to sibling PR + Linear (PR #18 vs #20 ENG-25 race)

## Decisions
- [decisions/mcp-for-small-writes-checkout-for-big](decisions/2026-05-26-mcp-for-small-writes-checkout-for-big.md) — Single-file writes go through GitHub MCP; multi-file or test-needing changes use the mounted checkout + `git push`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Closed PR can receive `AGENT_REVIEW: REQUEST_CHANGES` seconds after close (race)

PR #18 (ENG-25) was closed at 10:10:16Z as a duplicate of PR #20. A second reviewer-agent pass posted `AGENT_REVIEW: REQUEST_CHANGES` at 10:10:45Z — ~30s after the close, presumably from a reviewer session that started before the dedup-close fired. The dispatcher's review-feedback webhook still kicked off a manager session for PR #18 even though the PR was closed.

What to do when this happens:
1. **Don't reopen** to "follow the kickoff literally" — that undoes the prior session's intentional dedup decision and creates two open PRs again.
2. **Don't push to the closed branch** — pushes to a closed PR's branch don't trigger re-review and aren't visible anywhere useful.
3. **Don't push to the sibling live PR's branch** unless that PR is owned by the same session id — each session owns its own branch; cross-session pushes step on work.
4. **Do** post a clear comment on the closed PR explaining the race and pointing to the live sibling.
5. **Do** cross-post the substantive feedback on the live sibling PR so its session sees it.
6. **Do** capture the feedback on the Linear ticket too, so a future session picks it up if both PRs stall.

Round-limit accounting: a `REQUEST_CHANGES` on a closed PR doesn't count toward the 3-round limit on the live sibling (different PR, different review thread). But the substantive ask still has to land somewhere; surfacing on the ticket is what keeps it from rotting.