Summary
A live drive session repeatedly drops and reconnects its input stream. Reported by Khaliq as happening constantly during normal use, with a screenshot of the operator-visible output:
[drive] input stream lost (worker_timeout: worker did not respond in time); reconnecting…
[drive] input stream reconnected after 1 attempt(s)
The recovery works — it reconnects on the first attempt — which is exactly why this has survived: it is self-healing and therefore easy to scroll past. But it makes cross-node drive feel unreliable for the person actually using it, and every reconnect is a window in which typed input can be affected.
This lands directly on the top-priority attach work (relay#1535), which has just been proven end to end. A capability that works but visibly flaps is not finished.
Where the two halves live
The error originates in the broker:
crates/broker/src/worker_request.rs:57 — #[error("worker_timeout: worker did not respond in time")]
crates/broker/src/worker_request.rs:102 — DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(5), documented as "the default when call sites don't specify one explicitly. Matches the previous snapshot timeout."
The teardown and reconnect are in the CLI:
packages/cli/src/cli/lib/attach-input-recovery.ts:255 — input stream lost (${reason}); reconnecting…
packages/cli/src/cli/lib/attach-input-recovery.ts:337 — input stream reconnected after ${attempt} attempt(s)
:247 — the reconnect-disabled variant
The leading hypothesis, to confirm or kill — do not assume it
A five-second request timeout is being applied to a worker that is legitimately busy. The workers being driven are coding agents; a Claude Code worker mid-inference routinely takes far longer than five seconds to service a request. If a normal, healthy "the agent is thinking" state trips a timeout whose default was inherited from snapshot, then the input stream is being torn down for a worker that was never actually unresponsive.
Note the comment on the constant: it says the default matches the previous snapshot timeout. A value chosen for a screen-grab is not obviously the right value for an interactive input channel, and inheriting it may be the whole bug.
What to establish first:
- Which request is timing out on the drive input path, and does it pass an explicit timeout or fall through to the 5s default? If it falls through, that is the finding.
- Is the worker actually unresponsive, or merely busy? Correlate a
worker_timeout against what the worker was doing — a busy-but-healthy worker and a wedged one must be distinguishable, and if they are not, that is a second finding.
- Should a busy worker tear down the input stream at all? A drive session's input channel and a request/response probe have different liveness requirements. Reconnecting is a reasonable response to a dead socket, not to a slow answer.
Definition of done
- The mechanism named with file:line — which call site, which timeout, which condition fires it.
- A must-fire / must-not-fire pair: a test that fails if a busy but healthy worker causes an input-stream teardown, and one proving a genuinely dead worker still triggers reconnect. Prove the must-fire bites by reverting the fix and pasting the red transcript.
- If the fix is a timeout value, justify the new number against a measurement rather than picking a rounder one. An unmeasured constant is what produced this.
- Live confirmation on a real cross-node drive session against a working agent, over a period long enough for the current behaviour to have flapped several times.
Constraints
mergePolicy: never — open a PR, stop at review. Do not restart any node. Do not release or kill verify-1535-fixtest-e-0816 (PID 55650 on finn-mini), a frozen reproduction for relay#1539.
Do not confuse this with the neighbouring defects, all live right now: relay#1537 (drive session never released on clean detach → already has an active driver), relay#1539 (live agent unroutable → No active agent named X), relay#1541 (recipient_unresolved on DM send). This one is worker_timeout on an established drive session that then recovers.
Summary
A live drive session repeatedly drops and reconnects its input stream. Reported by Khaliq as happening constantly during normal use, with a screenshot of the operator-visible output:
The recovery works — it reconnects on the first attempt — which is exactly why this has survived: it is self-healing and therefore easy to scroll past. But it makes cross-node drive feel unreliable for the person actually using it, and every reconnect is a window in which typed input can be affected.
This lands directly on the top-priority attach work (relay#1535), which has just been proven end to end. A capability that works but visibly flaps is not finished.
Where the two halves live
The error originates in the broker:
crates/broker/src/worker_request.rs:57—#[error("worker_timeout: worker did not respond in time")]crates/broker/src/worker_request.rs:102—DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(5), documented as "the default when call sites don't specify one explicitly. Matches the previoussnapshottimeout."The teardown and reconnect are in the CLI:
packages/cli/src/cli/lib/attach-input-recovery.ts:255—input stream lost (${reason}); reconnecting…packages/cli/src/cli/lib/attach-input-recovery.ts:337—input stream reconnected after ${attempt} attempt(s):247— the reconnect-disabled variantThe leading hypothesis, to confirm or kill — do not assume it
A five-second request timeout is being applied to a worker that is legitimately busy. The workers being driven are coding agents; a Claude Code worker mid-inference routinely takes far longer than five seconds to service a request. If a normal, healthy "the agent is thinking" state trips a timeout whose default was inherited from
snapshot, then the input stream is being torn down for a worker that was never actually unresponsive.Note the comment on the constant: it says the default matches the previous snapshot timeout. A value chosen for a screen-grab is not obviously the right value for an interactive input channel, and inheriting it may be the whole bug.
What to establish first:
worker_timeoutagainst what the worker was doing — a busy-but-healthy worker and a wedged one must be distinguishable, and if they are not, that is a second finding.Definition of done
Constraints
mergePolicy: never— open a PR, stop at review. Do not restart any node. Do not release or killverify-1535-fixtest-e-0816(PID 55650 on finn-mini), a frozen reproduction for relay#1539.Do not confuse this with the neighbouring defects, all live right now: relay#1537 (drive session never released on clean detach →
already has an active driver), relay#1539 (live agent unroutable →No active agent named X), relay#1541 (recipient_unresolvedon DM send). This one isworker_timeouton an established drive session that then recovers.