Skip to content

The UI of Agentic Chat corrupted preventing retry or knowledge of failure

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

Summary

Send a prompt, watch it transition from running to nothing.

image

Steps to reproduce

We're at the mercy of the API failing, causing the UX to not follow properly.

What is the current bug behavior?

Aside from starting over, the UX is effectively in a stuck state.

What is the expected correct behavior?

Give me the ability to say,,, retry,,, or start again, or alert me that there was a failure.

Relevant logs and/or screenshots

TraceID from LangSmith: 8b8ff00f-b6a6-4424-ab82-2ee9bdea49d5

ModelError("{'type': 'error', 'error': {'details': None, 'type': 'api_error', 'message': 'Internal server error'}}")Traceback (most recent call last):


  File "/home/aigateway/app/duo_workflow_service/agents/agent.py", line 143, in _model_completion
    response = await self._model.ainvoke(messages)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_core/runnables/base.py", line 5444, in ainvoke
    return await self.bound.ainvoke(
           ^^^^^^^^^^^^^^^^^^^^^^^^^


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 400, in ainvoke
    llm_result = await self.agenerate_prompt(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 974, in agenerate_prompt
    return await self.agenerate(
           ^^^^^^^^^^^^^^^^^^^^^


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 932, in agenerate
    raise exceptions[0]


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 1089, in _agenerate_with_cache
    async for chunk in self._astream(messages, stop=stop, **kwargs):


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langchain_anthropic/chat_models.py", line 1429, in _astream
    async for event in stream:


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/anthropic/_streaming.py", line 185, in __aiter__
    async for item in self._iterator:


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/anthropic/_streaming.py", line 228, in __stream__
    raise self._client._make_status_error(


anthropic.APIStatusError: {'type': 'error', 'error': {'details': None, 'type': 'api_error', 'message': 'Internal server error'}}



During handling of the above exception, another exception occurred:



Traceback (most recent call last):


  File "/home/aigateway/app/venv/ai-gateway-M6hW6iiC-py3.12/lib/python3.12/site-packages/langgraph/pregel/__init__.py", line 2655, in astream
    async for _ in runner.atick(


  File "/home/aigateway/app/duo_workflow_service/agents/agent.py", line 96, in run
    model_completion = await self._model_completion(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


  File "/home/aigateway/app/duo_workflow_service/agents/agent.py", line 172, in _model_completion
    await self._error_handler.handle_error(model_error)


  File "/home/aigateway/app/duo_workflow_service/errors/error_handler.py", line 70, in handle_error
    raise error


duo_workflow_service.errors.error_handler.ModelError: unknown: {'type': 'error', 'error': {'details': None, 'type': 'api_error', 'message': 'Internal server error'}} (Status: 200)


During task with name 'planning' and id 'b1e8fa57-2d68-dbe6-4a46-bd71716b0df9'

The GitLab Language Server

025-07-21T14:14:31:181 [debug]: fetch: request for https://gitlab.com/api/graphql made with https agent.
2025-07-21T14:14:31:219 [debug]: fetch: request for https://gitlab.com/api/v4/ai/duo_workflows/workflows/1032456/events made with https agent.
2025-07-21T14:14:31:220 [info]: [Duo Workflow Runner] More than one workspace folder detected. Using workspace folder /Users/skarbek/projects/release-tools
2025-07-21T14:14:31:220 [debug]: [DuoWorkflowNodeExecutor][1032456] Running workflow: {"goal":"I have a running GDK.  No client is configured to enable this project to speak to a GDK.  Create a proper configuration that can be leveraged such that any action can be taken against a gdk instance.  GDK is this: https://gitlab.com/gitlab-org/gitlab-development-kit","image":"registry.gitlab.com/gitlab-org/duo-workflow/default-docker-image/workflow-generic-image:v0.0.4","type":"software_development","existingWorkflowId":"1032456","metadata":{"projectId":"430285","namespaceId":"9970"},"additionalContext":[],"workspaceFolderPath":"/Users/skarbek/projects/release-tools","workflowId":"1032456","enabledFeatureFlags":["duo_workflow_claude_3_7","duo_workflow_workhorse","duo_workflow_web_chat_mutation_tools","duo_workflow_use_handover_summary","duo_workflow_work_item_tools","enable_anthropic_prompt_caching","expanded_ai_logging"]}
2025-07-21T14:14:31:220 [debug]: [WorkflowTokenService] Reusing existing valid token for workflow "1032456"
2025-07-21T14:14:31:241 [debug]: [DuoWorkflowNodeExecutor][1032456] Starting workflow stream with client type "grpc"
2025-07-21T14:14:31:241 [debug]: [GrpcWorkflowClient] Created gRPC Duo Workflow Service client: {"correlationId":"d17fec7e-24e4-4f96-be97-e705cac53072","workflowServiceBaseUrl":"duo-workflow-svc.runway.gitlab.net:443"}
2025-07-21T14:14:31:244 [info]: [MCP] Looking for configuration at: /Users/skarbek/.gitlab/duo/mcp.json
2025-07-21T14:14:31:244 [info]: [MCP] Successfully parsed MCP configuration
2025-07-21T14:14:31:461 [debug]: fetch: request to https://gitlab.com/api/v4/ai/duo_workflows/workflows/1032456/events returned HTTP 201 after 243 ms
2025-07-21T14:14:32:039 [debug]: fetch: request to https://gitlab.com/api/graphql returned HTTP 200 after 858 ms
2025-07-21T14:14:32:089 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStarted
2025-07-21T14:14:32:089 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowCheckpoint
2025-07-21T14:14:32:089 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStatus
2025-07-21T14:14:32:089 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowGoal
2025-07-21T14:14:34:388 [debug]: [WorkflowTokenService] Reusing existing valid token for workflow "1032456"
2025-07-21T14:14:34:388 [debug]: [DuoWorkflowNodeExecutor][1032456] Received new checkpoint: {"workflowStatus":"PLAN_APPROVAL_REQUIRED"}
2025-07-21T14:14:34:388 [info]: [Duo Workflow Plugin] Received new event
2025-07-21T14:14:34:388 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowCheckpoint
2025-07-21T14:14:34:389 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStatus
2025-07-21T14:14:34:412 [debug]: [WorkflowTokenService] Reusing existing valid token for workflow "1032456"
2025-07-21T14:14:34:412 [debug]: [DuoWorkflowNodeExecutor][1032456] Received new checkpoint: {"workflowStatus":"RUNNING"}
2025-07-21T14:14:34:412 [info]: [Duo Workflow Plugin] Received new event
2025-07-21T14:14:34:412 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowCheckpoint
2025-07-21T14:14:34:413 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStatus
2025-07-21T14:14:36:180 [info]: [Duo Workflow Plugin] Fetching Duo Agent Platform data for ID: 1032456
2025-07-21T14:14:36:181 [debug]: [SimpleApiClient] Making GraphQL request: query: getDuoWorkflowEvents
2025-07-21T14:14:36:182 [debug]: fetch: request for https://gitlab.com/api/graphql made with https agent.
2025-07-21T14:14:39:924 [debug]: fetch: request to https://gitlab.com/api/graphql returned HTTP 200 after 3742 ms
2025-07-21T14:14:40:110 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStarted
2025-07-21T14:14:40:110 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowCheckpoint
2025-07-21T14:14:40:110 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowStatus
2025-07-21T14:14:40:110 [debug]: [WebviewInstanceMessageBus:duo-workflow-panel:31d31348-5a75-4a62-9fcf-459f3999cc40] Sending notification: workflowGoal
2025-07-21T14:14:41:179 [info]: [Duo Workflow Plugin] Fetching Duo Agent Platform data for ID: 1032456
2025-07-21T14:14:41:179 [debug]: [SimpleApiClient] Making GraphQL request: query: getDuoWorkflowEvents
2025-07-21T14:14:41:179 [debug]: fetch: request for https://gitlab.com/api/graphql made with https agent.
2025-07-21T14:14:42:591 [debug]: fetch: request to https://gitlab.com/api/graphql returned HTTP 200 after 1411 ms
Edited by 🤖 GitLab Bot 🤖