Let cloud task users override the single-PR default#3639
Open
tatoalo wants to merge 2 commits into
Open
Conversation
The existing-PR cloud task prompts hard-blocked creating a new branch or PR
("You MUST NOT create a new branch, close the existing PR, or create a new
PR"), so the agent refused even when the user explicitly authorized additional
PRs. Make those prohibitions the default rather than absolute: continue on the
existing PR unless the user explicitly asks otherwise, matching the escape
hatch already used in the non-auto-publish path.
Generated-By: PostHog Code
Task-Id: 228eca58-a141-4129-af28-560fab7a150a
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
richardsolomou
approved these changes
Jul 21, 2026
tatoalo
marked this pull request as ready for review
July 21, 2026 16:11
tatoalo
enabled auto-merge (squash)
July 21, 2026 16:11
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/agent/src/server/agent-server.ts:3299-3302
**Override Conflicts With Mandatory Checkout**
When the user explicitly requests a separate branch or PR, the preceding `MUST` steps still require checking out the existing PR and pushing to that branch. The agent can therefore update the existing PR before applying the new exception, so the explicit request is misapplied.
```suggestion
`Unless the user explicitly asks for a new branch or separate PR, you MUST:\n` +
`1. ${this.buildExistingPrCheckoutInstruction(prUrl)}\n` +
`2. Make changes, commit, and push to that branch\n` +
`By default, do not create a new branch, close the existing PR, or create a new PR — continue on the existing PR. If the user explicitly asks for a new branch or separate PR, follow their instruction instead.`
```
Reviews (1): Last reviewed commit: "Let cloud task users override the single..." | Re-trigger Greptile |
The auto-publish existing-PR prompt still opened with an unconditional "You MUST" checkout-and-push-to-existing-branch block before the override sentence, so an explicit request for a separate PR conflicted with the mandatory steps. Gate those steps on "Unless the user explicitly asks for a new branch or separate PR" so the exception is consistent. Addresses Greptile P1. Generated-By: PostHog Code Task-Id: 228eca58-a141-4129-af28-560fab7a150a
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 runs with an existing open PR hard-blocked the agent from creating a new branch or PR ("You MUST NOT create a new branch, close the existing PR, or create a new PR"). Users who explicitly authorized additional PRs still got refused, since the instruction had no override.
Changes
Made the single-PR prohibition the default rather than absolute in the existing-PR cloud task prompts (
packages/agent/src/server/agent-server.ts): continue on the existing PR unless the user explicitly asks for a new branch or separate PR. This matches the escape hatch already used in the non-auto-publish path, so the default (avoid spontaneous extra PRs) is preserved while explicit user authorization is honored.How did you test this?
Text-only prompt-string change with no assertions against the edited lines. Typecheck and the surrounding test suite fail only on pre-existing environment limitations (unbuilt workspace deps and the sandbox's global
git commitblock used by test fixtures) — none related to this change.Automatic notifications
Created with PostHog from a Slack thread