# test\(server\): keep provider fixture directories host-portable · PR \#9572 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/9572)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: windows-tests/temp-cleanup

Target branch: windows-tests/mode-bits

Head commit: 81701181474409b87d8050f2836f60bcd152d3cd

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/9572)

[Commits](https://git.cafe/pingdotgg/t3code/pull/9572/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/9572/diffs?format=markdown)

## Description

---

The Claude capabilities probe can abort before its child has fully exited. On Windows, keeping that child’s cwd inside the scoped fixture makes cleanup fail with EBUSY. The Codex collaboration fixture also hard-coded /tmp, which does not exist on Windows.

Give the Claude child a separate temporary cwd with retrying final cleanup, and use the host temporary directory for Codex collaboration sessions. The provider behavior and assertions are unchanged.

Part of the Windows test-suite stack rooted at [#9564](https://github.com/pingdotgg/t3code/pull/9564); the manual Windows lane comes from [#9538](https://github.com/pingdotgg/t3code/pull/9538).

Originally prepared with Claude Fable 5 in Claude Code; finalized with GPT-5.6 Sol in T3 Code.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Test-only fixture and cleanup changes; no production code paths or assertion changes.
> 
> **Overview**
> Makes two provider integration tests reliable on **Windows** by fixing how temporary working directories are created and torn down. **Production provider behavior and test assertions are unchanged.**
> 
> **Claude capabilities probe SDK test:** The fake child’s workspace `cwd` is no longer nested inside the scoped fixture directory. It is created as its own temp folder and removed in a finalizer via `node:fs/promises` `rm` with **retries** (instead of Effect scheduling, which would stall under `TestClock`). That avoids **EBUSY** when the probe aborts the SDK before the child exits and still holds the directory as `cwd`.
> 
> **Codex collab runtime integration tests:** Every `makeCodexSessionRuntime` call that used a hard-coded **`/tmp`** `cwd` now uses **`os.tmpdir()`**, so sessions run against the host temp path on Windows and Unix alike.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 81701181474409b87d8050f2836f60bcd152d3cd. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
