Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(aui): use globalThis.queueMicrotask for host delivery

Steven Enamakelbb53ce7dad58
diff --git a/app/src/features/conversations/aui/queueAdapter.ts b/app/src/features/conversations/aui/queueAdapter.ts
index adc4066387..253da178ac 100644
--- a/app/src/features/conversations/aui/queueAdapter.ts
+++ b/app/src/features/conversations/aui/queueAdapter.ts
@@ -78,7 +78,7 @@ export function buildOpenHumanQueueAdapter({
// while the runtime is running) always takes this lane.
const enqueue = (message: AppendMessage) => {
log('[aui-queue] enqueue (idle) → host send');
- queueMicrotask(() => deliver('enqueue', message));
+ globalThis.queueMicrotask(() => deliver('enqueue', message));
};
// Running thread: the host queues it as a follow-up. One macrotask later, so
// the composer clear the runtime made just before calling us reaches the host