Skip to content

fix(tools): make file write outcomes reliable - #29

Merged
enowdev merged 2 commits into
enowdev:mainfrom
elliottophellia:create-error
Aug 13, 2026
Merged

fix(tools): make file write outcomes reliable#29
enowdev merged 2 commits into
enowdev:mainfrom
elliottophellia:create-error

Conversation

@elliottophellia

Copy link
Copy Markdown
Collaborator

Summary

Make write_file outcomes explicit and reliable across tool execution, persisted chat history, and the project Changes sidebar.

  • Reject missing content before any filesystem mutation while allowing intentional zero-byte files.
  • Reject directory targets with an actionable error.
  • Report empty files as 0 bytes, 0 lines.
  • Instruct the agent not to claim creation until write_file returns successfully.
  • Persist and restore tool error state so failed writes remain visibly failed after reload.
  • Render persisted tool calls without a result as incomplete, never as successful writes.
  • Include only completed, successful write_file and edit_file calls in the project Changes sidebar.
  • Add focused backend and frontend regression coverage.

Verification

  • go test ./...
  • bun test
  • bun x tsc -b --noEmit
  • make build
  • Browser smoke against the built dashboard on http://127.0.0.1:8787

Manual Checks

  • A directory target renders an actionable failed write and remains failed after reload.
  • An intentional empty file is created as a real zero-byte file.
  • An empty overwrite truncates an existing file successfully.
  • Failed and interrupted writes are not listed as project changes.

@enowdev
enowdev merged commit 80a7f18 into enowdev:main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants