diff --git a/CHANGELOG.md b/CHANGELOG.md index 855006ad42d..ffc1d71285a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Media/Windows: open saved attachment temp files read/write before fsync so Windows WebChat and `chat.send` media offloads no longer fail with EPERM during durability flush. (#76593) Thanks @qq230849622-a11y. - Codex plugin: mirror the experimental upstream app-server protocol and format generated TypeScript before drift checks, keeping OpenClaw's `experimentalApi` bridge compatible with latest Codex while preserving formatter gates. - Telegram/media: derive no-caption inbound media placeholders from saved MIME metadata instead of the Telegram `photo` shape, so non-image and mixed attachments no longer reach the model as ``. Fixes #69793. Thanks @aspalagin. - Agents/cache: keep per-turn runtime context out of ordinary chat system prompts while still delivering hidden current-turn context, restoring prompt-cache reuse on chat continuations. Fixes #77431. Thanks @Udjin79. diff --git a/src/media/store.ts b/src/media/store.ts index e1086921349..0aeb949c30a 100644 --- a/src/media/store.ts +++ b/src/media/store.ts @@ -349,7 +349,7 @@ async function writeSavedMediaBuffer(params: { const tempDest = path.join(params.dir, `.${params.id}.${crypto.randomUUID()}.tmp`); try { await fs.writeFile(tempDest, params.buffer, { mode: MEDIA_FILE_MODE }); - const handle = await fs.open(tempDest, "r"); + const handle = await fs.open(tempDest, "r+"); try { await syncSavedMediaHandle(handle); } finally {