From 553f7ee883a12e06bcbf6a1f2bdece81a82006c8 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:38:42 +0100 Subject: [PATCH] fix: start a plugin's api calls at once again, not a tick later --- lib/plugin-sandbox/host-api.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/plugin-sandbox/host-api.ts b/lib/plugin-sandbox/host-api.ts index 82d88a5ba..f67a9b59a 100644 --- a/lib/plugin-sandbox/host-api.ts +++ b/lib/plugin-sandbox/host-api.ts @@ -2041,8 +2041,11 @@ export async function dispatchApiCall( throw new Error(`Unknown API method "${method}"`); } - const assistant = await dispatchAssistant(plugin, method, args); - if (assistant !== NOT_MINE) return assistant; + // The AI assistant's methods; every other call goes on without waiting a tick. + if (method in ASSISTANT_PERMS) { + const assistant = await dispatchAssistant(plugin, method, args); + if (assistant !== NOT_MINE) return assistant; + } switch (method) { case 'proxy.fetch': return proxyFetch(plugin, args, opts?.sink ?? null);