Error: EBUSY: resource busy or locked, open 'C:\Users\test\.local\share\opencode\storage\part\msg_c07a553a4002p8bzxuNt6daDoG\prt_c07a562c6001jnaED4w5LAGvzE.json' #7908

Open
opened 2026-02-16 18:08:38 -05:00 by yindo · 3 comments
Owner

Originally created by @linshaobao on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

I ask a question, it raise an Error, what's wrong:
Error: EBUSY: resource busy or locked, open 'C:\Users\test\.local\share\opencode\storage\part\msg_c07a553a4002p8bzxuNt6daDoG\prt_c07a562c6001jnaED4w5LAGvzE.json'

prt_c07a562c6001jnaED4w5LAGvzE.json is:

{
  "id": "prt_c07a562c6001jnaED4w5LAGvzE",
  "sessionID": "ses_3f85aacbdffeXEDB17hfwGOI8D",
  "messageID": "msg_c07a553a4002p8bzxuNt6daDoG",
  "type": "text",
  "text": "下面给出几种 **快速启动 opencode** 的可行方案,您可以根据自己的使用习惯挑选或组合使用。所有方案都不需要每次手动打开 PowerShell 再输入 `opencode`,而是把启动过程固化为点击或一次性键入即可。\n\n---\n\n## 1️⃣ 在桌面 / 开始菜单创建快捷方式(Windows)\n\n| 步骤 | 操作说明 |\n|------|----------|\n| **①** | 在任意目录(如 `C:\\Tools\\opencode`)新建一个 **批处理文件** `opencode.bat`,内容只有一行:<br>`@echo off && opencode`(确保 `opencode` 已在系统 **PATH** 中) |\n| **②** | 右键该 `.bat` → **发送到** → **桌面(创建快捷方式)**。随后可以把快捷方式拖到 **开始菜单** 或 **任务栏** 固定。 |\n| **③** | 双击快捷方式即可弹出一个最小化的终端窗口并自动运行 `",
  "time": {
    "start": 1769654805190
  }
}

my opencode version is:

opencode --version
1.1.39

Originally created by @linshaobao on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question **I ask a question, it raise an Error, what's wrong:** Error: EBUSY: resource busy or locked, open `'C:\Users\test\.local\share\opencode\storage\part\msg_c07a553a4002p8bzxuNt6daDoG\prt_c07a562c6001jnaED4w5LAGvzE.json'` prt_c07a562c6001jnaED4w5LAGvzE.json is: ``` { "id": "prt_c07a562c6001jnaED4w5LAGvzE", "sessionID": "ses_3f85aacbdffeXEDB17hfwGOI8D", "messageID": "msg_c07a553a4002p8bzxuNt6daDoG", "type": "text", "text": "下面给出几种 **快速启动 opencode** 的可行方案,您可以根据自己的使用习惯挑选或组合使用。所有方案都不需要每次手动打开 PowerShell 再输入 `opencode`,而是把启动过程固化为点击或一次性键入即可。\n\n---\n\n## 1️⃣ 在桌面 / 开始菜单创建快捷方式(Windows)\n\n| 步骤 | 操作说明 |\n|------|----------|\n| **①** | 在任意目录(如 `C:\\Tools\\opencode`)新建一个 **批处理文件** `opencode.bat`,内容只有一行:<br>`@echo off && opencode`(确保 `opencode` 已在系统 **PATH** 中) |\n| **②** | 右键该 `.bat` → **发送到** → **桌面(创建快捷方式)**。随后可以把快捷方式拖到 **开始菜单** 或 **任务栏** 固定。 |\n| **③** | 双击快捷方式即可弹出一个最小化的终端窗口并自动运行 `", "time": { "start": 1769654805190 } } ``` my opencode version is: > opencode --version 1.1.39
yindo added the windows label 2026-02-16 18:08:38 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10904: After BSOD there is no sessions available to read but they are still exists on disk - Related to file locking and corruption in storage
  • #8792: Error: UV_UNKNOWN: unknown error - Similar file access errors on Windows storage
  • #7733: Storage resilience: atomic writes, safer temp cleanup, repair/restore tools - Addresses the underlying issue of file locking and corruption prevention

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #10904: After BSOD there is no sessions available to read but they are still exists on disk - Related to file locking and corruption in storage - #8792: Error: UV_UNKNOWN: unknown error - Similar file access errors on Windows storage - #7733: Storage resilience: atomic writes, safer temp cleanup, repair/restore tools - Addresses the underlying issue of file locking and corruption prevention Feel free to ignore if none of these address your specific case.
Author
Owner

@linshaobao commented on GitHub (Jan 28, 2026):

Thanks for pointing out these potential duplicates! I've carefully reviewed each one:
#10904: Focuses on session visibility issues after BSOD, while my issue involves active file locking (EBUSY) preventing access during normal operation.
#8792: Concerns a generic UV_UNKNOWNerror without specific file locking details, whereas my error is explicitly EBUSYwith a clear resource contention scenario.
#7733: Discusses architectural improvements for storage resilience (future prevention), but doesn‘t address the immediate ”resource busy“ locking mechanics I’m encountering.
My issue is specifically about Windows file locking conflicts​ with OpenCode‘s storage files (e.g., prt_*.json), which isn’t covered by the above. I‘ll proceed to create a new issue to ensure the specific ”EBUSY on Windows“ case is tracked separately. I appreciate you helping me check! 👍

@linshaobao commented on GitHub (Jan 28, 2026): Thanks for pointing out these potential duplicates! I've carefully reviewed each one: #10904: Focuses on session visibility issues after BSOD, while my issue involves active file locking (EBUSY) preventing access during normal operation. #8792: Concerns a generic UV_UNKNOWNerror without specific file locking details, whereas my error is explicitly EBUSYwith a clear resource contention scenario. #7733: Discusses architectural improvements for storage resilience (future prevention), but doesn‘t address the immediate ”resource busy“ locking mechanics I’m encountering. My issue is specifically about Windows file locking conflicts​ with OpenCode‘s storage files (e.g., prt_*.json), which isn’t covered by the above. I‘ll proceed to create a new issue to ensure the specific ”EBUSY on Windows“ case is tracked separately. I appreciate you helping me check! 👍
Author
Owner

@FleetAdmiralJakob commented on GitHub (Feb 14, 2026):

I think I have the same problem, as I'm on Windows and get the same error. But I get it with rm (remove) when I want to remove the worktree

@FleetAdmiralJakob commented on GitHub (Feb 14, 2026): I think I have the same problem, as I'm on Windows and get the same error. But I get it with rm (remove) when I want to remove the worktree
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7908