write_task_file
Writes a complete file to an authorized project via a running ChatGPT execution, using an expected SHA256 check to prevent overwriting others' changes and returning before/after receipts.
Instructions
Write one whole file in the authorized project through your running ChatGPT execution. SA and REVIEW executions are read-only and are refused, as are content that looks like a secret, a stale Context version and a change that would drop original Python comments. Returns before/after SHA256 receipts. Read the file with read_workspace first to get expected_sha256; finish the role with submit_agent_report.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to the project root, for example 'src/app.py'. | |
| content | Yes | The complete new file text (UTF-8, at most 200 KB); it replaces the file. | |
| project_id | Yes | Registered project id, as returned by list_projects. | |
| execution_id | Yes | Your running ChatGPT execution, taken from the dispatched handoff. The task must have an approved plan. | |
| expected_sha256 | No | SHA256 of the file as you last read it with read_workspace. Omit it only to create a file that does not exist yet; a mismatch is rejected so you never overwrite someone else's change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||