feat(everyrow-mcp): reduce progress polling for widget-capable clients#259
Draft
jackwildman wants to merge 1 commit intomainfrom
Draft
feat(everyrow-mcp): reduce progress polling for widget-capable clients#259jackwildman wants to merge 1 commit intomainfrom
jackwildman wants to merge 1 commit intomainfrom
Conversation
Replace the tight 12s polling loop with a single 25s long-poll for claude.ai and Claude Desktop. The MCP App widget already shows live progress via REST polling, so Claude doesn't need to keep checking. This reduces tool calls from unbounded (~20+ per task) to always 3, preventing the "tool-use limit reached" error on long-running tasks. - Add should_long_poll() to detect widget-capable clients - Add _progress_long_poll() with 25s timeout and 5s internal checks - Add widget_handoff message telling Claude to stop polling - Add "Ask Claude to show results" prompt in widget on completion - Increase GCPBackendPolicy timeoutSec to 120s for long-poll headroom - stdio (Claude Code) and internal clients keep the 12s loop unchanged Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
should_long_poll()detection and_progress_long_poll()with internal 5s checks, widget handoff message, and "Ask Claude to show results" widget prompttimeoutSecto 120s; stdio (Claude Code) and internal clients keep the 12s loop unchangedContext
On claude.ai,
everyrow_progressis called every 12s in a tight loop. At ~20 tool calls per turn, Claude hits the limit after ~4 minutes, requiring the user to click "Continue." The MCP App widget already handles visual progress independently via REST polling, so Claude's repeated checks are redundant.Tool call comparison:
Client behavior:
Test plan
should_long_poll(),progress_message(widget_handoff=True), and_progress_long_poll()(completion, timeout, intermittent errors, all-fail, progress reporting)timeoutSec: 120🤖 Generated with Claude Code