Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Nov 18, 2025

Important

Detects API instability in runTask() and triggers a retry if instability is detected by monitoring specific events.

  • Behavior:
    • Detects API instability in runTask() in runTask.ts by monitoring api_req_retry_delayed and api_req_retried events.
    • Sets isApiUnstable flag to true if instability detected.
    • Throws error at end of runTask() if isApiUnstable is true to trigger retry.
  • Events:
    • Adds api_req_retry_delayed and api_req_retried to loggableSays and monitors them in TaskEvent handler.

This description was created by Ellipsis for 603a60f. You can customize this summary. It will automatically update as commits are pushed.

@cte cte requested review from jr and mrubens as code owners November 18, 2025 19:32
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Enhancement New feature or request labels Nov 18, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 18, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 2 issues to address:

  • Logger is closed before error is thrown, preventing proper error logging in calling function
  • User-aborted tasks will be retried if API instability is detected

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@cte cte merged commit 045c2d6 into main Nov 18, 2025
18 checks passed
@cte cte deleted the cte/retry-eval-tasks-if-api-unstable branch November 18, 2025 19:45
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 18, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 18, 2025
logger.close()

if (isApiUnstable) {
throw new Error("API is unstable, throwing to trigger a retry.")
Copy link
Contributor

Choose a reason for hiding this comment

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

User-aborted tasks should not trigger retries. If a task is aborted (likely user-initiated at line 303-305), the retry will be triggered anyway when API instability is detected. Consider checking taskAbortedAt to prevent retrying intentionally cancelled tasks.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 18, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 19, 2025