Skip to content

[BUG] The program is stuck in a loop. #8901

@mini2s

Description

@mini2s

Problem (one or two sentences)

#8888

Context (who is affected and when)

#8888

Reproduction steps

@daniel-lxs @mrubens

  1. if (autoApprovalEnabled && alwaysApproveResubmit)
image

2.send bad message (you can give provider some error apikey)
image

3.click Cancel or click New Task
image

image

4.The program is stuck in a loop

// note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely.
			if (autoApprovalEnabled && alwaysApproveResubmit) {😱😱loop😱😱
				let errorMsg

				if (error.error?.metadata?.raw) {
					errorMsg = JSON.stringify(error.error.metadata.raw, null, 2)
				} else if (error.message) {
					errorMsg = error.message
				} else {
					errorMsg = "Unknown error"
				}

				// Apply shared exponential backoff and countdown UX
				await this.backoffAndAnnounce(retryAttempt, error, errorMsg) 😱😱loop😱😱

				// Delegate generator output from the recursive call with
				// incremented retry count.
				yield* this.attemptApiRequest(retryAttempt + 1) 😱😱loop😱😱

				return
			} else {

Expected result

no loop

Actual result

loop

Variations tried (optional)

No response

App Version

3.29.3

API Provider (optional)

None

Model Used (optional)

No response

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Issue [In Progress]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions