You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add WriteFile tool for single-step file creation and full-content writing #738
In agent and sub-agent workflows, creating a new file or writing full contents currently requires a multi-turn ceremony:
Turn 1: Calling ManageResources(create=["path/to/file"]) to scaffold an empty file and promote it to editable context.
Turn 2: Calling EditFile targeting line anchor @000 to replace the entire empty buffer.
For smaller or local models (e.g. 12B–20B parameters), this creates significant friction:
Wastes an entire conversational round and thousands of prompt tokens just to create an empty file.
Models naturally try to invoke standard file creation tools (WriteFile), get rejected, and then fall back to fragile shell commands (cat << 'EOF', python -c, echo), which easily break on Windows escaping or special characters (&, quotes, newlines).
If the file does not exist yet on disk, EditFile rejects the call with File not found.
Proposed Solution
Add a dedicated, built-in WriteFile tool with sane defaults:
Single-step creation and writing: Accepts file_path and content.
Activity