Chore tier, CI-breaking. The session-API availability fixture (mode_block.test.ts, landed #814) fails fast on CI with ENOTEMPTY: directory not empty, rmdir <saf-home>/.config/opencode/node_modules/... — reproduced twice on the same run (different subdirs: zod/src/v3/tests, effect/dist/unstable), while director-local runs pass. Root cause: the vendored binary's background package-install into the temp HOME outlives the test's client shutdown, and the cleanup's recursive rmSync collides mid-write. Timing-dependent → CI hits it, warm local runs don't. It blocks every open PR's fast check (seen blocking #828). Fix: wait for the server process tree to fully exit before removing the temp HOME (the root cause), plus a retrying rmSync (maxRetries + retryDelay) for any residual — the teardown must never be the flake.
Chore tier, CI-breaking. The session-API availability fixture (mode_block.test.ts, landed #814) fails
faston CI withENOTEMPTY: directory not empty, rmdir <saf-home>/.config/opencode/node_modules/...— reproduced twice on the same run (different subdirs: zod/src/v3/tests, effect/dist/unstable), while director-local runs pass. Root cause: the vendored binary's background package-install into the temp HOME outlives the test's client shutdown, and the cleanup's recursive rmSync collides mid-write. Timing-dependent → CI hits it, warm local runs don't. It blocks every open PR's fast check (seen blocking #828). Fix: wait for the server process tree to fully exit before removing the temp HOME (the root cause), plus a retrying rmSync (maxRetries + retryDelay) for any residual — the teardown must never be the flake.