Repository navigation
The bar stops offering Open PR for a branch that has one - #2102
Merged
Merged
Conversation
A run told to publish its own work opens its pull request as it finishes, with its own tools. Nothing records it, and nothing tells the dashboard's pull request cache — which, while the run was still working, had answered "this branch has none" and keeps that answer for a minute. So the bar offered Open PR for a branch that already had one: the single mistake that bar exists to prevent. His run: the page cached "no PR" at 18:54:32, the agent opened #6 at 18:55:08, the run ended at 18:55:16, and the bar went on offering Open PR. An answer taken before a run ended cannot have seen what the run did on its way out, so it is thrown away rather than trusted. The read that follows is cold, so the first look after a run ends says it does not know yet and the bar offers nothing — never the wrong thing — and the branch is read again a second later, which is the pace a just-ended run is read at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👤 Suleiman
🤖 automated · Opus 5, effort high
Why. That Auto sentence is handed to the agent, so the agent opens the pull request itself, with its own tools. Nothing records it on the run, and nothing tells the dashboard's pull request cache — which, while the run was still working, had already answered "this branch has none" and keeps that answer for a minute (
cache.ts,ttlMs). So the bar offered Open PR for a branch that already had one, which is the single mistake that bar exists to prevent: pressing it asks the git host to open a second.His run, by the clock:
The fix. An answer taken before a run ended cannot have seen what the run did on its way out, so it is thrown away rather than trusted. A cached read now says when it was read (
Cached.at), and the handoff compares that against the run's ownendedAt.The read that follows is cold, so the first look after a run ends says it does not know yet — and the bar offers nothing, never the wrong thing. The branch is read again a second later, which is the pace a just-ended run is already read at (
SETTLING_EVERY_MS, #2097).Checked against his repo, through the built modules in one process, with the real cache and the real git host:
PR #7 was opened by hand to stand in for the agent's publish step, and is closed again.
Nothing is thrown away for a run still going, for an answer never read, or for a record whose end is not a date — each has its own case in the test.
pnpm build,pnpm -r typecheck,pnpm -r testgreen.🤖 Generated with Claude Code