Increase max requests when using copilot on rails flow#1531
Merged
Conversation
MicroFish91
approved these changes
Jun 29, 2026
MicroFish91
left a comment
Contributor
There was a problem hiding this comment.
LGTM, although some of the explaining comments are long and repeated in multiple sections, so might be worth trimming/consolidating those
Member
Author
|
@copilot Remove some of the comments that are extra verbose and don't explain critical code paths |
Contributor
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.
When running the Copilot on Rails scaffold flow, a low chat.agent.maxRequests limit causes Copilot to pause partway through with a "continue to iterate?" prompt. This PR raises that limit to a high ceiling at the Workspace scope so scaffolding can run uninterrupted — for both autopilot and guided runs.
Changes
Autopilot (autopilot.ts): replaced the temporary global maxRequests override (saved/restored) with a persistent Workspace bump (WORKSPACE_MAX_REQUESTS = 9999) that is intentionally not restored. Added getEffectiveMaxRequests() and raiseWorkspaceMaxRequests() helpers (no-op when no workspace folder is open or the limit is already high enough). The global chat.tools.global.autoApprove toggle is still saved and restored as before.
Guided scaffold (ScaffoldPlanViewController.ts): when the effective limit is below 1000, shows a Yes/No modal asking whether to raise the request limit for the workspace before launching the scaffold chat. "Yes" raises it; "No" (the modal's close affordance) proceeds unchanged. Skipped for autopilot (which already bumps it) and for the debug plan.
Notes
The workspace setting is written to settings.json and left in place by design.
chat.tools.global.autoApprove remains global and is always restored after an autopilot run.