fix(copilot): fix copilot running workflow stuck on 10mb error#3999
fix(copilot): fix copilot running workflow stuck on 10mb error#3999TheodoreSpeaks merged 5 commits intostagingfrom
Conversation
|
@BugBot review |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 8064090. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9c99c3a. Configure here.
Greptile SummaryThis PR fixes a UX hang in the Copilot run tool where a workflow execution failing due to a 10MB payload limit would cause the UI to get stuck in "Running workflow" forever. The root cause was that The fix pre-serializes the request body, checks its size on a non-OK response, and strips the
Confidence Score: 4/5Safe to merge; fix correctly resolves the reported hang, with a minor threshold calibration recommended. Score of 4 reflects one P2 finding: the 1MB retry threshold is substantially below the actual 10MB server limit, meaning any failed request with a body over 1MB silently loses logs regardless of whether size was the cause. This doesn't break the fix but could hide debugging information in production. Straightforward to address by raising the threshold closer to the real limit. apps/sim/lib/copilot/client-sse/run-tool-execution.ts — LARGE_PAYLOAD_THRESHOLD value (1MB vs actual 10MB server limit) Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as Client (run-tool-execution.ts)
participant Server as /api/copilot/confirm
participant Redis as Redis
Client->>Server: POST body (logs included, ~10MB+)
Server-->>Client: 500 non-OK (body too large)
Client->>Client: !res.ok && bodySize > 1MB?
alt body is large → strip logs
Client->>Server: POST retry (logs stripped)
Server->>Redis: Publish completion event
Server-->>Client: 200 OK
Note over Client: Copilot unblocked
else retry also fails
Client->>Client: logger.warn (error not propagated)
end
Reviews (1): Last reviewed commit: "Strip only logs on payload too large" | Re-trigger Greptile |
Summary
Workflow executions failing with request payload too large will hang with "Running workflow" forever. This is because the reporting tool fails to run as well due to the 10mb constraint. On payload too large, attempt to strip logs and resend the completion.
Type of Change
Testing
Checklist
Screenshots/Videos