← AUTOMATER NEWSROOM

Qwen Code lets hosted workers claim released coding sessions

Qwen Code v0.29.1 lets a Hosted Harness worker with room to load a session claim it from the control plane. The feature is off by default and requires both pool and control-plane configuration.

Three steps show a draining Qwen Code worker releasing an idle session, the control plane recording demand on wake, and a worker with a free slot claiming the session by polling and then acquiring the writer.Three steps show a draining Qwen Code worker releasing an idle session, the control plane recording demand on wake, and a worker with a free slot claiming the session by polling and then acquiring the writer.
In an opted-in Qwen Code pool, a worker with a free cold-open slot can claim a released session through a poll. It then uses the existing load path to acquire the writer. Illustration based on Qwen Code pull request #18626.

Qwen Code v0.29.1, released November 29, gives operators of managed coding-agent pools a new way to place released sessions. A Hosted Harness worker with a free slot can ask the control plane for work and claim a session. Previously, the control plane chose a worker in round-robin order before it knew whether that worker had room to load the session. The new behavior is off by default. Qwen Code v0.29.1 release notes

Qwen Code’s v0.29.1 release page on GitHub.
The Qwen Code project’s v0.29.1 release page on GitHub. · Original source

What changes when a worker drains

The clearest example is a pool with two workers. One drains and releases an idle coding session. When a request wakes that session, the control plane records demand for it. With work polling enabled, the other worker can pick up the session on a poll if it has a free cold-open slot, meaning it has room to load a session it does not already have open. A worker that is draining stops polling. This gives operators a way to tie released-session placement to the capacity of workers that are still accepting work. Hosted Harness implementation and test report

A claim reserves the session for that worker while it loads. The worker uses the existing session load path, including the same descriptor checks and the step that gives it authority to write to the session. Once the worker acquires that authority, the reservation is consumed. If the load fails, the reservation can lapse after 30 seconds, leaving the existing push fallback available. The distinction matters when reading traces from a drain. A claim tells you which worker has reserved the session, while writer acquisition and attachment tell you the handoff completed. Hosted Harness implementation and test report

The PR author reported a local test with two real Harness processes and a MySQL-backed control plane. After the first worker drained, the second claimed the released session, acquired the writer and reported the session attached. In the baseline run with the work URL removed, the push path took over immediately. That comparison shows the placement change in the tested setup. For background on how managed sessions can become available for a later handoff, see our earlier coverage of Qwen Code’s session parking and cold recovery. Two-worker test report

What to verify before enabling work polling

The project describes a three-step rollout. Upgrade the control plane first, then set QWEN_MANAGED_HARNESS_WORK_URL to the internal control-plane origin on every member of the target pool, then enable qwen.managed-agent.harness-pull.enabled. Pool members must advertise matching capabilities. The control plane rejects work-pull configuration without a Harness pool. The worker PR also says the reference Kubernetes chart does not pass the work URL to Harness containers, so Kubernetes operators should check how their deployment supplies it. Worker configuration · Control-plane configuration

In a test pool, start with one idle session on the worker you intend to drain and leave a free slot on a second worker. Record when the session is released, when the wake request arrives and when the second worker attaches. Confirm that the second worker claimed the session through a poll, then repeat with work polling disabled to establish what push placement looks like in the same environment. Comparing the two runs gives you a way to distinguish a working pull handoff from a session that eventually attached through fallback. Qwen Code’s two-worker test and baseline

Treat an empty poll as one observation in that timeline. The control-plane change lets a positive-wait poll return at its deadline even when the server’s four claim-processing threads are occupied. A reservation that commits after the response can be offered again on a later poll, and saturation can still delay new offers. Measure from wake request to session attachment if you want to know how long a developer waits during a rollout. Control-plane polling changes

Sources

  1. Release Release v0.29.1 · QwenLM/qwen-code · GitHub
  2. feat(managed-agent): Let a Hosted Harness claim released Sessions over the work poll by doudouOUC · Pull Request #18626 · QwenLM/qwen-code · GitHub
  3. fix(managed-agent): harden Harness work polling by doudouOUC · Pull Request #18624 · QwenLM/qwen-code · GitHub