Coding agentPerplexityConfirmed
Story 7 of 22 in the Wednesday 2 December editionPerplexity adds QuickJS Code Mode to Agent API, cutting costs 53%
Programmatic_tool_calling runs parallel JS scripts inside an embedded WebAssembly loop, lifting WANDR ultra to 89.4% at $10.30 and xhigh to 80.5%.

Perplexity launched Code Mode (programmatic_tool_calling) in its Agent API on 2 December 2026, replacing serial model-to-tool round-trips with a single model-authored JavaScript script that runs calls in parallel and filters payloads outside the context window. Building on its June Search as Code container system and recent Time Machine Search and Context API snapshots, Code Mode executes inside an embedded QuickJS WebAssembly runtime directly in the agent loop without booting a Linux sandbox container.
Unified tools interface and non-blocking exec_wait
Any Agent API tool configured with allowed_callers set to programmatic becomes callable through one typed tools.* interface, spanning web_search, fetch_url, people_search, finance_search, MCP servers, and sandbox file or shell tools. Scripts stream partial results after 10 seconds while continuing asynchronously in the background, letting the agent pursue other research branches before collecting finished outputs via exec_wait.
WANDR benchmark gains across high, xhigh and ultra
Code Mode ships across updated high, xhigh, and ultra effort presets plus custom API requests. On Perplexity’s WANDR wide-and-deep research benchmark, Sol-6.2 with Code Mode pushed xhigh to 80.5% at $3.85 per task (47% below 5 November xhigh at 76.5% and $7.30). On ultra, Opus 5.5 plus three Sol-6.2 agents reached 89.4% at $10.30 per task, 53% below 5 November ultra ($21.71 at 85.9%), while mid-tier high plus Code Mode hit 47.7% at $0.38 per task.
Technical details
- API feature and runtime
- programmatic_tool_calling running JavaScript inside an embedded QuickJS WebAssembly runtime
- Supported tool surface
- Typed tools.* API across web_search, fetch_url, people_search, finance_search, MCP, and sandbox tools
- WANDR ultra benchmark
- 89.4% at $10.30/task (Opus 5.5 + 3 Sol-6.2 + Code Mode; down 53% from $21.71 on 5 November)
- WANDR xhigh and high
- 80.5% at $3.85/task on xhigh (-47% cost); 47.7% at $0.38/task on high (+2.9 points over baseline)
- Async execution control
- Non-blocking 10-second partial return with background collection or cancellation via exec_wait
Release details & context
Isolating model upgrades from programmatic execution
Perplexity measured its WANDR gains in two sequential steps to separate newer reasoning models from Code Mode itself. Upgrading from 5 November presets alone moved xhigh (Sol-6.2) from 76.5% ($7.30) to 78.7% ($5.57) and ultra (Opus 5.5 plus three Sol-6.2) from 85.9% ($21.71) to 88.5% ($12.12); enabling Code Mode on those same models then moved xhigh to 80.5% ($3.85) and ultra to 89.4% ($10.30).
Earlier mid-tier models had regressed under programmatic execution due to script syntax mistakes, making the +2.9-point gain on the high preset a milestone for smaller models. More developer platform updates appear in our Perplexity company archive.
Common questions
Does Perplexity Code Mode require booting a Linux container for every script?
No. Unlike June’s Python pplx_sdk sandbox container, Code Mode runs JavaScript directly inside an embedded QuickJS WebAssembly runtime in the agent loop with zero container boot overhead.
How does Code Mode handle long-running fan-out scripts without blocking the agent?
After 10 seconds, exec returns partial output while keeping the script running in the background so the main agent can work on other branches and gather or cancel results later using exec_wait.
Sources
- PrimaryPerplexity Blog: Introducing Code Mode in the Agent APIperplexity.ai
Perplexity timeline & related coding agent
- Perplexity brings Computer to Chromium extensions and Teammates
Perplexity embeds Perplexity Computer into its Chromium browser extension side panel and adds prompt-box Teammate setup on web for Max users.
- Perplexity launches Time Machine for 365-day Search and Context snapshots
Perplexity ships Time Machine in its Search and Context APIs, letting agents query archived web snapshots up to 365 days back with no price surcharge.
- Google open-sources 16-line Gemini 4 deep-research skill
Google publishes an Apache 2.0 16-line deep-research agent skill in google-gemini/demolab, preferred over 90% of the time in blind Gemini 4 evals.
- SpaceXSI rebrands Cursor as Grok Build with rewritten desktop app
SpaceXSI unites Cursor into Grok Build Desktop and TUI, rewriting the Agents Window off VS Code internals for 3 to 10 times faster performance.

