Duo Chat "Can not start workflow that has status failed" error

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When submitting a prompt in VS Code Agentic Chat, user receives

Your request was valid but Workflow failed to complete it. Please try again.

At the backend log we observe this cause:

Can not start workflow that has status failed

Looking at the logs below, we can observe that the workflow was first being updated as "failed" before the second request to update it to be "started"

Steps to reproduce

I entered the prompt at AI Gateway project

Based on the changes in Git commit 96fdd0434331ef5298aca106ae63721968b661ad, update the tests accordingly

Example Project

https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist

What is the current bug behavior?

It raises error.

What is the expected correct behavior?

It returns LLM response.

Relevant logs and/or screenshots

https://log.gprd.gitlab.net/app/discover#/view/7429c74c-8ff2-4c2a-85b3-b5f71becf816?_g=h@128c84a&_a=h@110af01

Screenshot_2025-08-08_at_1.03.31_PM

Output of checks

This bug happens on GitLab.com.

VS Code GitLab Workflow extension 6.36.0

Possible fixes

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖