Agentforce in IC2 frequently errors out but works "great" in VS Code

23 views
Skip to first unread message

Patrick Visniewski

unread,
Nov 13, 2025, 8:00:50 PMNov 13
to Illuminated Cloud Q&A
I frequently get API errors trying to run prompts.
The error looks like some limit error actually but if I unfortunately immediately switch to VS code and use their Agentforce Vibe plugin it works great.
It's been weeks since I was last even able to use the Dev Assistant.

Before that I had a few times where it worked for some prompts then would fail for others but then work for yet another prompt later making it seem less like a limit issue despite mentioning limit.


agentforce_limit_error.png


Scott

unread,
Nov 13, 2025, 8:04:54 PMNov 13
to Illuminated Cloud Q&A, patrick_s_...@homedepot.com
IC's API calls for Agentforce for Developers were directly modeled after those issued from VS Code including token counts. It's possible some of those parameters have changed over time and what worked before no longer works. Can you provide a concrete example of something that works properly in VS Code and not in IC? Ideally something that I can use to reproduce the behavior locally easily?

Regards,
Scott Wells

Patrick Visniewski

unread,
Nov 13, 2025, 8:27:32 PMNov 13
to Illuminated Cloud Q&A, Scott, Patrick Visniewski
  Anything right now

PROMPT: do anything but error out

I have NEVER seen this error from VS Code. Which hurts because I am forced to use VS occasionally.

While trying this again I got a new error from IC2

Premature end of chunk coded message body: closing chunk expected

But it did work this time..... 

The prompt was originally "write test for the current class"

It failed in IC2 but worked in VS Code.

The VS Code extension is the newer "Agentforce Vibe" extension though not sure if there was an earlier simpler Agentforce extension. It behaves/sounds a lot different from the IC2 responses. So my guess is there are some significant differences ignoring the options to actually "act" on your code if you let the VS extension do so.

Not sure this constitutes the results of having the debugging on  but I did set the option for the logging but did not restart IDEA after doing so. Not sure if a restart is needed but there's not a lot in this snippet of logging to see really
It includes a concrete prompt too.



agentforce_error_idea.log

Patrick Visniewski

unread,
Nov 13, 2025, 8:34:25 PMNov 13
to Illuminated Cloud Q&A, Patrick Visniewski, Scott
Actually that is probably not all you need since I decide to "trash" the previous session.
To try to make sure I had a clean setup.

Attached is the logging starting right after I did this.
Whereas the previous was too short,, this includes multiple attempts I think
for_reals_agentforce_error_idea.log

Scott

unread,
Nov 14, 2025, 11:51:20 AMNov 14
to Illuminated Cloud Q&A, patrick_s_...@homedepot.com, Scott
Thanks for the attachments. I'll take a look at the beginning of next week and see if I can reproduce what you're seeing. Assuming I can, my guess (or perhaps hope) is that I just need to adjust the max tokens parameters to match whatever changed expectations exist now in those API endpoints.

You are correct, though, that Agentforce Vibes is not the same thing as the previous Agentforce for Developers. It's actually a Salesforce fork of Cline. I obviously won't be doing the same thing, but I've documented how to set up various agentic AI tool plugins for JetBrains IDEs -- including Cline itself -- to use Salesforce's MCP server:

I'll also be investigating how to use hosted MCP servers shortly, perhaps next week since I'll likely shift gears to this area anyway.

Regards,
Scott Wells

Scott

unread,
Nov 14, 2025, 11:53:00 AMNov 14
to Illuminated Cloud Q&A, Scott, patrick_s_...@homedepot.com
I've logged a bug in the public issue tracker for this:


I'll report any status updates there.

Regards,
Scott Wells

Patrick Visniewski

unread,
Nov 17, 2025, 1:27:48 PMNov 17
to Illuminated Cloud Q&A, Scott, Patrick Visniewski
Great thank you.

If I can help get the the agent force support in IC2 to work as robustly as it usually does in V$ Code I'm glad to help.

VS Code with the various extensions is not very stable IMO. Also, taken together, VS Code uses a lot more resources on my computers than IDEA+IC2+Extensions.
Not that IDEA is always rock sold stable but it is leaps and bounds above VS Code.

Scott

unread,
Nov 17, 2025, 1:49:43 PMNov 17
to Illuminated Cloud Q&A, patrick_s_...@homedepot.com, Scott
Please see the details I've added here:


Unfortunately "Agentforce for Developers" does not really exist in VS Code any longer, at least not in its original form as reproduced in IC. "Agentforce Vibes" is a completely different thing and it better compared to what's documented here:


As I noted in 2881, it doesn't seem like the "old" Agentforce for Developers API allows the client to specify a larger allowed prompt size, only the maximum number of tokens. I can make that configurable, but it wouldn't solve the original "prompt is beyond the limit" issue you reported. However, you can control that somewhat from IC by disabling the automatic context options and adding required context files explicitly, if any.

If you don't mind, let's have any further discussion on this in 2881 so that it's captured as part of the issue details.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages