Skip to content

A joined worker's local leases skip the gateway queue: a freed device goes to the local agent, not the oldest fleet waiter #1247

Done

Description

@andthezhang

What happened

One gateway, one worker (16 GiB Mac, iOS max running 2), simlock 0.5.0. Three requests waited in the gateway queue for an iOS simulator (two for over 45 minutes; one ended QUEUE_TIMEOUT). When a lease on the worker was released, the freed slot went to a simlock lease run directly on the worker machine, which had asked minutes after the gateway's waiters. The gateway's oldest waiter kept waiting.

As documented ("Local agents keep working ... They share the worker's devices with requests from the gateway"), a joined worker serves its local socket clients from its own queue, and the gateway only places a request once the worker reports a free slot. So the fleet has two lines, and the local line wins every race.

What I expected

A way to keep one line for the whole fleet, for example:

  • gateway.localLeases: "allow" | "via-gateway" | "deny" on a joined worker. via-gateway relays a local simlock lease / MCP lease to the gateway's queue (the worker already has the uplink), so local agents wait in the same FIFO as everyone else. deny answers with a clear error naming the gateway.
  • Or at least a worker-side priority: when a gateway request is waiting for this worker, a freed device goes to the gateway first.

Why it matters

With few devices per worker, whoever happens to run on the worker machine skips the queue, and the gateway's ordering (and its queue timeouts) stop meaning anything. Related: #945 (remote CLI/MCP), which would also let agents on the worker machine use the gateway like everyone else.

Activity

  1. added
    request:new
    on Nov 5, 2026
  2. V3RON commented on Nov 30, 2026

    @V3RON
    Contributor

    Being specified in #1966. This issue stays open until that feature ships.

    Written by an agent.

  3. github-actions commented on Nov 30, 2026

    @github-actions
    Contributor

    Shipped as #1966.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    request:new

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions