Qwen Code bug: dangling worktree sidecars silently orphan checkouts on session deletion
wenshao · ghdev · 2026-11-27
Issue #18475 on QwenLM/qwen-code reports a fail-open defect: deleting a session that owns a managed worktree silently removes the transcript while leaving the checkout and an unreadable worktree sidecar behind. In the reproduced case the sidecar was a dangling symlink, yet deletion returned removed: [id] with errors: [] and no warning.
The root cause is that the session-delete fast path treats any existsSync miss as "no sidecar", conflating dangling symlinks and other stat failures with a genuinely absent entry. The reporter asks for fail-closed semantics: refuse with a clear error and preserve the record, or complete a fully verified cleanup — only a real ENOENT should use the fast path. The bug was independently reproduced while verifying PR #18454 and pre-exists on main.
More from coding & agent
- Standard Agent Specification v0.2.0: an open standard for portable, composable agents — adnan_hashmi · 2026-11-29
- Practitioner's tool sweep: Claude Code excellent but dev-oriented, Replit workflow hasn't hit a wall — laughlinrigby · 2026-11-29
- Pre-tool hooks that block coding agents from editing too early — overkill or useful? — Vegetable-Pound6846 · 2026-11-29
- Karpathy let Claude Code run 7 hours: 45,000 lines, 31 datasets, a few skipped states — AryHHAry · 2026-11-29
- Agent wrote 45k lines in 7 hours but skipped states — verification is the bottleneck — AryHHAry · 2026-11-29
- Agent Skills directory tops 1.5M installs, Vercel and Matt Pocock dominate leaderboard — adnan_hashmi · 2026-11-29