Code Mode
An agent tool-calling optimization pattern in which the model writes a small program that invokes multiple tools consecutively inside a sandbox, returning only the final result to the model context, thereby reducing round-trip token costs and preventing intermediate data from polluting the context.
Timeline (last 90 days)
In the new version, previews for command mode and Code Mode use a 24 KiB content budget, while ordinary tool results entering the conversation history use a roughly 32 KiB head-and-tail-preserving approach.
In Code Mode, the runtime bridge retains oversized nested tool return values before they are passed into the script and emits recovery metadata separately, so that a subsequent slice() does not remove the recovery reference to that oversized return value.
According to a case study published by Maxim, Bifrost's Code Mode reduced running cost from $377 to $29, a drop of about 92%, in a test spanning 16 MCP servers and 508 tools, while maintaining a 100% task pass rate.
All Facts (3)
In the new version, previews for command mode and Code Mode use a 24 KiB content budget, while ordinary tool results entering the conversation history use a roughly 32 KiB head-and-tail-preserving approach.
50%UnverifiedIn Code Mode, the runtime bridge retains oversized nested tool return values before they are passed into the script and emits recovery metadata separately, so that a subsequent slice() does not remove the recovery reference to that oversized return value.
50%UnverifiedAccording to a case study published by Maxim, Bifrost's Code Mode reduced running cost from $377 to $29, a drop of about 92%, in a test spanning 16 MCP servers and 508 tools, while maintaining a 100% task pass rate.
50%