fix(agent): avoid redundant PR checkout#3579
Merged
Merged
Conversation
Make existing-PR follow-up context check out the branch only when needed, preventing cloud agents from repeating the checkout on every prompt. Generated-By: PostHog Code Task-Id: 9e493924-1eab-496a-ba66-aba8366de96e
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
tatoalo
marked this pull request as ready for review
July 20, 2026 12:22
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
tatoalo
enabled auto-merge (squash)
July 20, 2026 12:23
Contributor
|
Reviews (1): Last reviewed commit: "fix(agent): avoid redundant PR checkout" | Re-trigger Greptile |
tatoalo
disabled auto-merge
July 20, 2026 12:24
Use one conditional checkout instruction for both the static cloud system prompt and per-message detected PR context, preventing conflicting guidance on follow-up turns. Generated-By: PostHog Code Task-Id: 9e493924-1eab-496a-ba66-aba8366de96e
tatoalo
enabled auto-merge (squash)
July 20, 2026 12:27
github-actions
Bot
dismissed
their stale review
July 20, 2026 12:27
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
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.
Problem
Cloud task follow-ups receive existing-PR instructions on every turn. The instructions required
gh pr checkoutunconditionally, so agents repeatedly checked out the same PR branch before handling each user message.Why: Follow-up interactions should continue from the active branch without unnecessary repository setup or repetitive status messages.