write_file
Writes file content into a per-issue workspace for automated GitHub issue resolution, enforcing protected paths and per-issue write limits.
Instructions
Create or overwrite a file inside the workspace start_issue created for
this issue. relative_path is checked the same way as read_file
(no absolute/drive/UNC/'..'/'.git' paths) and is additionally checked
against the fleet manifest's protected paths. Writes are capped per
issue (default 5 attempts, configurable via SELF_DEV_MAX_ATTEMPTS); a
refused write does not count against that cap. Returns "OK" on success,
"REFUSED: ..." for a blocked path, "EXHAUSTED: ..." once the attempt
cap is reached, or "ERROR: ..." for other failures -- never raises.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Full text content to write to the file, replacing any existing content. | |
| issue_number | Yes | The issue number whose active workspace to write into; must have been started with start_issue first. | |
| relative_path | Yes | Path to the file to write, relative to the issue workspace root. Absolute paths, drive letters, UNC paths, '..'-escaping paths, '.git' paths, and paths protected by the fleet manifest are refused. |