Lane Queue
By default A3S Code runs every task in-process, with no queue. The lane queue is optional infrastructure: register an external handler for a lane and the tools routed to that lane are queued for an outside worker instead of being executed by the agent. You then drain the pending tasks, run them however you like, and report results back. Reach for this only when an external worker is genuinely part of your architecture.
The four lanes are control, query, execute, and generate. Each handler has a mode of internal (the default), external, or hybrid.
Notes:
- The default path is queue-free.
hasQueue()/has_queue()returnsfalseuntil you register at least oneexternal(orhybrid) lane handler. If you never callsetLaneHandler/set_lane_handler, every task runs in-process and there is nothing to drain. - Each pending task carries
task_id,session_id,lane,command_type,payload, andtimeout_ms. Pass thetask_idback tocompleteExternalTask/complete_external_taskonce the work is done. - The result shape is
{ success, result?, error? }—resultholds any JSON-serializable payload, anderroris an optional message for failures.completeExternalTask/complete_external_taskreturnstrueif the task was found and completed,falseotherwise. - In Python these queue methods are synchronous; in Node
setLaneHandler,pendingExternalTasks, andcompleteExternalTaskreturn promises, whilehasQueueis synchronous.