Investigate $workflowId error showing up in the agentic chat
User problem to solve
Users occasionally see the error "Error: Variable $workflowId of type AiDuoWorkflowsWorkflowID! was provided invalid value" which disrupts their chat experience. This error is confusing and provides no actionable guidance for the user.
Assumption: The root cause is that the workflowId or activeThread stored in localStorage becomes invalid, either because:
- It contains just a numeric ID (
"123") instead of the required full Global ID format ("gid://gitlab/Ai::DuoWorkflows::Workflow/123") - The stored value becomes corrupted, undefined, or empty
- A race condition occurs where the workflow is deleted but the local reference persists in an inconsistent state
When the chat attempts to validate or fetch workflow events using this malformed ID, GraphQL's type coercion fails before any business logic can handle it gracefully.
Proposal
Spike to understand the issue and validate the assumption above.
Original writeup:
Title: Agentic Chat Displaying "$workflowId error" Message to Users
Description: Users are reporting frequent occurrences of an error message displaying "$workflowId error" within the agentic chat interface.
Impact:
- Multiple user reports
- Affecting chat functionality
- Error visible to end users
Additional Information:
- Error reports documented in Slack thread: https://gitlab.slack.com/archives/C08MY2AM42F/p1758310566156299
Steps to Reproduce:
- Visit any broken pipeline on Duo-enabled project (example)
- Click "troubleshoot"
- Note that agentic chat shows this error
Priority: High - Due to multiple user reports and customer-facing nature of the issue
Description was generated using AI