Skip to main content

How to debug Agentforce GACK Code errors (-1940051863 or -1760645555)

This is a step by step guide to help you troubleshoot Agentforce GACK code errors when retrieving your agents.

Written by Cecilia Califano
Updated today

We've seen Salesforce returning these errors around the time of the Winter ‘26 release (v65) when trying to retrieve all of your agents using the GenAIPlannerBundle metadata type and one or more agents contain corrupt metadata.

The message from Salesforce will result in an unknown exception, with GACK code -1940051863 or -1760645555 like the example below:

Error (UNKNOWN_EXCEPTION): UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 916268782-263932 (-1940051863)

To debug this, we suggest using the Salesforce CLI to test the retrieval of your agents following the steps we took on our example below.

First, we've confirmed what agents exist in the org:

$ sf org list metadata -m GenAiPlannerBundle 

Internal_Support_Guidance
Customer_Support_Agent
Internal_Support_Guidance_v2
EmployeeCopilotPlanner

Interestingly, there is an extra agent "EmployeeCopilotPlanner" that appears in the list metadata call that doesn’t appear in the Agentforce Studio.

We can retrieve the agent by itself successfully:

$ sf project retrieve start -m GenAiPlannerBundle:EmployeeCopilotPlanner

As well as the remaining agents all together:

$ sf project retrieve start 
-m GenAiPlannerBundle:Internal_Support_Guidance
-m GenAiPlannerBundle:Internal_Support_Guidance_v2
-m GenAiPlannerBundle:Customer_Support_Agent

This helps us to identify that the problem is with the agent "EmployeeCopilotPlanner" since when we tried to retrieve that agent with all the others, the retrieval failed.

How can we fix the agent's metadata?

We suggest to modify the agent in some way and deploy those changes to successfully update the agent with the correct metadata structure.

The least disruptive way to do this is just to change the description.

If changing the description does not work, you may have to start removing actions and topics.

This is how the agent metadata looked like before making any changes:

We then updated description:

and the agent was successfully changed:

$ sf project deploy start -m GenAiPlannerBundle:EmployeeCopilotPlanner

Changed: EmployeeCopilotPlanner

If we now try to retrieve the agent again we notice that the metadata structure is very different:

$ sf project retrieve start -m GenAiPlannerBundle:EmployeeCopilotPlanner

The agent has now been converted from a v64 structured agent to a v65 structured agent and we will now be able to retrieve this successfully in Gearset!

Did this answer your question?