fix: increase tool call limit to 50 and show clear pause message#2828
fix: increase tool call limit to 50 and show clear pause message#2828wwwillchen merged 2 commits intodyad-sh:mainfrom
Conversation
|
@BugBot run |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the agent's capability to handle more extensive multi-step operations by raising the tool call limit. It also refines the user experience by providing transparent communication when the agent pauses due to reaching this limit, offering explicit instructions for how to proceed. This change aims to balance the prevention of runaway processes with the need to support more intricate automated workflows. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with π and π on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Greptile SummaryThis PR increases the local agent's tool call step limit from 25 to 50, adds cross-pass step tracking, and introduces a Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Frontend as DyadStepLimit (UI)
participant Handler as local_agent_handler
participant AISDK as AI SDK (streamText)
User->>Handler: Send prompt
Handler->>AISDK: streamText(stopWhen: [stepCountIs(50), ...])
loop Up to 50 agentic steps
AISDK-->>Handler: step (model call + tool execution)
Handler-->>Frontend: sendResponseChunk (incremental text)
end
AISDK-->>Handler: stream ends (step limit reached)
Handler->>Handler: totalStepsExecuted += steps.length
alt totalStepsExecuted >= MAX_TOOL_CALL_STEPS (50)
Handler->>Handler: append <dyad-step-limit> to fullResponse
Handler->>Frontend: sendResponseChunk (final, includes dyad-step-limit tag)
Frontend-->>User: Render DyadStepLimit card (amber, "Paused after N tool calls")
User->>Frontend: Click "Continue" button
Frontend->>Handler: streamMessage(prompt="Continue")
Handler->>AISDK: New streamText pass (fresh 50-step budget)
else totalStepsExecuted < MAX_TOOL_CALL_STEPS
Handler->>Frontend: Normal response completion
end
Last reviewed commit: 0c31891 |
π€ Claude Code Review SummaryPR Confidence: 4/5All review comments addressed with a targeted fix; CI verification pending. Unresolved ThreadsNo unresolved threads Resolved Threads
Product Principle SuggestionsNo suggestions β principles were clear enough for all decisions. π€ Generated by Claude Code |
β Claude Code completed successfullySummary
Review Comments AddressedIssue 1: Remove unused
Issue 2: False positive step limit notification across multiple passes (devin-ai-integration, chatgpt-codex-connector, cubic-dev-ai Γ2, greptile-apps)
CI Check Analysis
|
|
@BugBot run |
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid β if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="e2e-tests/snapshots/local_agent_step_limit.spec.ts_local-agent---step-limit-pause-1.aria.yml">
<violation number="1" location="e2e-tests/snapshots/local_agent_step_limit.spec.ts_local-agent---step-limit-pause-1.aria.yml:175">
P2: This snapshot is too permissive and does not verify the new 50-call limit. Assert the exact number in the pause text so regressions in the configured threshold are caught.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| - img | ||
| - text: Read package.json | ||
| - img | ||
| - text: /Paused after \d+ tool calls/ |
There was a problem hiding this comment.
P2: This snapshot is too permissive and does not verify the new 50-call limit. Assert the exact number in the pause text so regressions in the configured threshold are caught.
Prompt for AI agents
Check if this issue is valid β if so, understand the root cause and fix it. At e2e-tests/snapshots/local_agent_step_limit.spec.ts_local-agent---step-limit-pause-1.aria.yml, line 175:
<comment>This snapshot is too permissive and does not verify the new 50-call limit. Assert the exact number in the pause text so regressions in the configured threshold are caught.</comment>
<file context>
@@ -0,0 +1,214 @@
+- img
+- text: Read package.json
+- img
+- text: /Paused after \d+ tool calls/
+- button "Continue":
+ - img
</file context>
- Increase MAX_TOOL_CALL_STEPS from 25 to 50 to allow longer multi-step tasks - Add step limit detection to track total steps across all passes - Show a clear <dyad-step-limit> message when the limit is reached - Create DyadStepLimit component for displaying the pause notification - Message instructs users to send "continue" to resume Fixes dyad-sh#2754 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbf8403b56
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <Button | ||
| variant="outline" | ||
| size="sm" | ||
| disabled={isLoading} |
There was a problem hiding this comment.
Disable Continue until current stream fully ends
The Continue action can be silently dropped because this button is enabled as soon as the <dyad-step-limit> chunk is rendered, but useStreamChat still treats the chat as actively streaming until onEnd and ignores duplicate stream requests for that chat. In that window, clicking Continue triggers streamMessage no-op behavior and the user has to click again later, which makes the pause/resume flow intermittently fail from the userβs perspective.
Useful? React with πΒ / π.
bbf8403 to
0c31891
Compare
|
@BugBot run |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c31891849
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Track total steps for step limit detection | ||
| totalStepsExecuted += steps.length; |
There was a problem hiding this comment.
Count only tool-call steps before emitting pause notice
totalStepsExecuted is incremented with steps.length, but steps includes non-tool iterations (for example the final text-only step when a pass completes normally). This means the new <dyad-step-limit> branch can fire even when fewer than 50 tool calls occurred, so users may see a "Paused after N tool calls" card and Continue prompt after a successful completion rather than an actual step-limit stop.
Useful? React with πΒ / π.
π Dyadbot Code Review SummaryVerdict: β YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues SummaryNo HIGH or MEDIUM issues found beyond what's already discussed in existing comments.
π’ Low Priority Notes (4 items)
π« Dropped False Positives (12 items)
Generated by Dyadbot multi-agent code review |
π Playwright Test Resultsβ All tests passed!
Total: 733 tests passed (7 flaky) (240 skipped)
|
Summary
<dyad-step-limit>message when the limit is reached, instructing users to send "continue" to resumeFixes #2754
Test plan
π€ Generated with Claude Code