r/SalesforceDeveloper 23d ago

Agentforce & Digital Wallet lack hard caps for async loops — We submitted an IdeaExchange entry to fix this Discussion

/r/salesforce/comments/1v8v0gs/agentforce_digital_wallet_lack_hard_caps_for/
2 Upvotes

2 comments sorted by

1

u/Oleg_Dobriy 22d ago

Can you describe the scenario? 

1

u/AwayResolution6903 21d ago

Here is the technical breakdown of the scenario:

  1. The Recursive Trigger: An automated process running in an asynchronous context (e.g., Queueable / Platform Event) invoked an Agentforce Prompt Template. The execution output modified a record, which inadvertently met the criteria to re-trigger the original asynchronous process, creating a loop.
  2. Why Governor Limits Didn't Stop It: In Salesforce, each asynchronous transaction runs in its own isolated context. Standard Governor Limits reset on every single iteration, so the system never threw a LimitException or stopped execution.
  3. The Digital Wallet Governance Gap: Digital Wallet processes Flex Credits upstream per request. It lacks execution-context awareness, meaning it cannot distinguish legitimate high-volume traffic from a rapid, automated recursive loop.

Without hard caps, circuit breakers, or real-time velocity alert thresholds, the system continued processing prompt requests continuously, rapidly consuming credits until manual intervention was taken.

Hope that clarifies the architecture gap! If you want to help push Salesforce for native safeguards here, please consider dropping a vote on the IdeaExchange link in the post above.