Lane Queue

Ordinary sessions are queue-free. Lane queues are optional advanced infrastructure for applications that need external or hybrid dispatch. They are separate from task and automatic subagent delegation.

Do not confuse this optional dispatch layer with the always-on Agent-wide task scheduler. The task scheduler uses an a3s-lane priority queue internally to share local execution capacity across sessions; a Lane queue hands selected work to local, external, or hybrid handlers.

When To Use It

Use a queue when you need:

  • external workers to complete selected tasks
  • hybrid routing between local and remote executors
  • queue metrics, dead letters, or dispatch observability
  • multi-machine work distribution

Configure A Session

TypeScript
const session = agent.session('/repo', {
queueConfig: {
enableDlq: true,
enableMetrics: true,
},
});
await session.setLaneHandler('execute', {
mode: 'external',
timeoutMs: 300000,
});

Lane names are control, query, execute, and generate.

External Completion

TypeScript
const pending = await session.pendingExternalTasks();
if (pending.length > 0) {
await session.completeExternalTask(pending[0].id, {
success: true,
result: { summary: 'completed by worker' },
});
}

Keep queue use explicit. Do not introduce it for normal local agent sessions.