Skip to content

[Bug]: Write failed error shown but file actually saved successfully (100% success rate) #55424

@hnfjf4289-sketch

Description

@hnfjf4289-sketch

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Write failed / Edit failed 错误提示频繁出现,但实际文件 100% 写入成功。这是 OpenClaw 工具层响应超时问题,不是文件系统问题。

Steps to reproduce

  1. 使用 OpenClaw 写入文件(write 或 edit 工具)
  2. 观察飞书界面底部显示"Write failed"错误提示
  3. 验证文件实际状态(Test-Path + Get-Item)
  4. 结果显示文件已成功写入(100% 成功率)

错误时间线(8 次错误,100% 成功):

  • 05:44 - Write failed ✅ 成功
  • 06:16 - Write failed ✅ 成功
  • 06:33 - Write failed ✅ 成功
  • 06:46 - Edit failed ✅ 成功
  • 06:52 - Write failed ✅ 成功
  • 06:56 - Edit failed ✅ 成功
  • 06:56 - Edit failed ✅ 成功
  • 07:30 - Write failed ✅ 成功

Expected behavior

工具应该正确显示文件写入状态,成功时显示成功提示,失败时显示失败提示。

Actual behavior

飞书界面底部显示"⚠️ Write failed"错误提示,但文件实际已成功写入(通过 Test-Path 和 Get-Item 验证,8 次错误,8 次成功,成功率 100%)。

OpenClaw version

2026.3.13

Operating system

Windows 11

Install method

npm global

Model

bailian/qwen3.5-plus

Provider / routing chain

openclaw -> bailian

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

受影响:所有使用 OpenClaw 写入文件的用户
严重程度:中等(不影响实际功能,但造成用户困惑)
频率:106 分钟内 8 次
后果:用户看到错误提示但文件实际成功写入,可能导致用户不信任工具状态

Additional information

已创建临时解决方案:

  • scripts/reliable-write.ps1 - 可靠写入脚本
  • scripts/tool-wrapper.ps1 - 工具包装器

建议修复:

  1. 检查工具执行器的超时设置
  2. 增加超时时间或重试机制
  3. 改进状态同步逻辑
  4. 添加写入后验证机制

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions