coder::create-file
Create one or more files. Request shape: {"files": [{"path": "...", "content": "..."}]}. Per-file `overwrite` and `parents` flags; non-accessible paths return C211. Paths are relative to the primary allowed root or absolute inside any allowed root (coder::info lists them); for host paths outside the jail use shell::fs::*.
- filesobject[]required
- contentstringrequired
- modestring
Octal permission bits as a string, e.g. "0644". Defaults to "0644".
- overwriteboolean
When false (the default), refuse to write if `path` already exists.
- parentsboolean
Create missing parent directories. Defaults to true so a single `coder::create-file` call can scaffold a fresh subtree.
- pathstringrequired
Path relative to the primary allowed root, or an absolute path inside any allowed root. Call `coder::info` to see the allowed roots. Paths outside every allowed root are rejected — use the shell worker's `shell::fs::*` for host paths outside the jail.
- resultsobject[]required
- bytes_writteninteger· uint64requiredmin 0
- errorany of
Structured error for this entry. `code` is stable for programmatic branching (e.g. `"C217"` means already-exists; pass `overwrite=true` to replace). `message` carries the corrective action an LLM agent needs to make a successful second call.
any of (2)Variant 1- codestringrequired
Stable error code, e.g. "C211". See the README error table.
- messagestringrequired
Human/LLM-readable message: problem + actual values + corrective next call.
Variant 2valuenull - pathstringrequired
Canonical absolute path (resolved through the jail); the caller's input verbatim when resolution failed.
- successbooleanrequired