Skip to content

Increase max requests when using copilot on rails flow#1531

Merged
nturinski merged 5 commits into
feat/CoRfrom
nat/9999Requests
Jun 30, 2026
Merged

Increase max requests when using copilot on rails flow#1531
nturinski merged 5 commits into
feat/CoRfrom
nat/9999Requests

Conversation

@nturinski

Copy link
Copy Markdown
Member
image

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.

@nturinski nturinski requested a review from a team as a code owner June 29, 2026 23:10

@MicroFish91 MicroFish91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although some of the explaining comments are long and repeated in multiple sections, so might be worth trimming/consolidating those

@nturinski

Copy link
Copy Markdown
Member Author

@copilot Remove some of the comments that are extra verbose and don't explain critical code paths

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@copilot Remove some of the comments that are extra verbose and don't explain critical code paths

Done in 4d07240. I trimmed/rem oved the extra verbose comments and consolidated docs in autopilot.ts, ScaffoldPlanViewController.ts, and settingUtils.ts while keeping behavior unchanged.

@nturinski nturinski merged commit 44c8f4a into feat/CoR Jun 30, 2026
2 checks passed
@nturinski nturinski deleted the nat/9999Requests branch June 30, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants