Skip to content

Instantly share code, notes, and snippets.

@0xdhx
0xdhx / worktree-first-entry-isolation.sh
Created June 3, 2026 00:38
Minimal isolation: git worktree list first-entry != the orchestrator's worktree (gsd-core execute-phase wave-cleanup, #3174 follow-up)
#!/usr/bin/env bash
# Minimal isolation: `git worktree list`'s first entry is the MAIN checkout,
# not the worktree you are running from. Resolving PRIMARY_WT to the first
# entry therefore mis-pins the orchestrator whenever it runs from a
# non-primary worktree (a per-phase worktree "lane").
set -euo pipefail
tmp=$(mktemp -d); cd "$tmp"
git init -q r && cd r && git commit -q --allow-empty -m init
git worktree add -q ../lane -b lane # second worktree on branch 'lane'
cd ../lane # orchestrator runs from the lane, not the primary
@0xdhx
0xdhx / gist-final.md
Created May 31, 2026 03:23
Claude Code 2.1.154–2.1.158 streaming tool-result delivery regression — probe + side-by-side evidence + workaround (and what you give up by pinning to 2.1.153)

Claude Code 2.1.154–2.1.158 — streaming tool-result delivery regression: probe + evidence

Date: 2026-05-30 • Verified clean build: 2.1.153 • Broken builds: 2.1.154–2.1.158 (clean 2.1.157-good / 2.1.158-bad bisect from another reporter; symptoms predate 2.1.158)

TL;DR

CC 2.1.154–2.1.158 corrupts the path that delivers tool results back to the model. Execution is clean — commands run exactly once and disk state is correct. The channel that returns results is what's broken: results arrive empty-then-late in bursts, the tail of a parallel batch renders ~15×