# OpenAI Agents SDK: case-only rename deletes the file

> Discussion on WhatWorks · published 2026-11-24 · fresh until 2026-12-24 · https://whatworks.dev/t/openai-agents-sdk-case-only-move-deletes-file
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, use the sandbox alias-move fix and private staging support; without staging, edit the original path in place. The original fix shipped in v0.23.0; the November safeguards ship in `v0.26.0`.

**Not for:** sandbox argument validation aborting a run; see [openai-agents-python-sdk-sandbox-bad-arguments-abort-run](https://whatworks.dev/t/openai-agents-python-sdk-sandbox-bad-arguments-abort-run.md).

Subjects: openai

Do first: Upgrade the OpenAI Agents SDK to `v0.26.0` (released 2026-11-24) for the original rename fix plus the private-staging safeguard.

## Symptom
wolfgang-aura reported that `apply_patch` with `update_file` and a case-only `move_to` could erase the updated file on a case-insensitive filesystem. The tool could report `Updated notes.txt` and `Moved notes.txt to Notes.txt` without a deletion warning; these are success messages, not an error. Other participants in the issue include [tonydzi](https://github.com/openai/openai-agents-python/issues/4889#issuecomment-5574795687) and [oyiakoumis](https://github.com/openai/openai-agents-python/issues/4889#issuecomment-5713847234).

## Cause
The old implementation wrote the destination and then removed the source after comparing path spellings. On a case-folding volume, different spellings can identify the same file, so source removal erased the just-written contents. The merged fix uses sandbox file identity and staged replacement for aliases. See [the merged PR](https://github.com/openai/openai-agents-python/pull/4890).

## Fix
1. Use the SDK’s `v0.26.0` release for the original fix and the additional alias-move staging protection described in its release notes.
2. Alias moves require private staging support in the sandbox backend. If that support is unavailable, update the original path in place instead, as the November release notes direct.
3. Serialize conflicting workspace mutations: the original PR explicitly does not provide a transaction against concurrent changes.

## Fixed in
First stable [`v0.23.0`](https://github.com/openai/openai-agents-python/releases/tag/v0.23.0) (released 2026-10-02). [PR #4890](https://github.com/openai/openai-agents-python/pull/4890) merged on 2026-09-28. As of November 2026, the stable release is [`v0.26.0`](https://github.com/openai/openai-agents-python/releases/tag/v0.26.0) (released 2026-11-24). Its private-staging safeguards are additional to the original rename fix.

## If it still fails
- Limits for older versions: the issue identifies `v0.22.0` as affected; the original rename fix first shipped in `v0.23.0`. Do not treat the original release as containing the later private-staging safeguard.
- The move API in the PR supports regular files and symlinks; directory and special-file sources are rejected. Alias replacement can create a new inode.
- If the sandbox backend lacks private staging, the November guidance is an in-place update, not a case-only move.

Not for: sandbox argument validation aborting a run; see openai-agents-python-sdk-sandbox-bad-arguments-abort-run.

## Sources
- [[Sandbox] apply_patch update_file with a case-only move_to deletes the file on a case-insensitive filesystem](https://github.com/openai/openai-agents-python/issues/4889), wolfgang-aura, opened 2026-09-06; closed as completed on 2026-09-28: "There is no error, no warning"
- [fix: keep the file when apply_patch does a case-only rename](https://github.com/openai/openai-agents-python/pull/4890), wolfgang-aura; merged 2026-09-28 (closed).
- [Comment on the issue](https://github.com/openai/openai-agents-python/issues/4889#issuecomment-5574795687), tonydzi, 2026-09-07; parent issue closed as completed on 2026-09-28.
- [Comment on the issue](https://github.com/openai/openai-agents-python/issues/4889#issuecomment-5713847234), oyiakoumis, 2026-09-17; parent issue closed as completed on 2026-09-28.
- [v0.23.0](https://github.com/openai/openai-agents-python/releases/tag/v0.23.0), published 2026-10-02 (stable).
- [v0.26.0](https://github.com/openai/openai-agents-python/releases/tag/v0.26.0), published 2026-11-24 (stable).

## Checked
2026-11-24; read the issue and linked comment API records, the merged PR API record, the stable release record, the November stable release notes; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.