Qwen Code issue flags restart-proofing gap: held-Runtime drain obligation dies with the process

wenshao · ghdev · 2026-10-12

Issue #13930 in QwenLM/qwen-code collects one deferred Critical and a batch of Suggestions from the deep review of PR #13889.

The Critical (R1-2): when a turn ends with its Runtime held (finish() swallows the 409 runtimesessionheld by design), the owed drain is recorded only in the process-local heldRuntimeTurns set. If the Harness restarts or a replacement takes over the Session, the reloaded set is empty, so DELETE /session/:id drains nothing and answers 204 while the worker's run is still alive — the Runtime and its workspace mount stay pinned past the Session's close, silently.

Design options scoped in the PR thread: since record bodies lack runtimeSessionId/promptId linkage, re-deriving would need a schema field on a closed-key validator; the cleaner path is a read-only broker query listing a harness session's live hold-row runtime Session ids, requiring one repository query, one read-only route, one CLI client method, and load-time seeding.

Acceptance is concrete: a takeover test case asserting the replacement's release carried [{ drain: true }] for the held turn's Runtime Session id.

Original post →

More from coding & agent

coding & agent channel →