files channel reads and writes the workspace file system and pushes change notifications as files move underneath you. Operations follow a request/response pattern keyed by requestId; watcher events are server pushes with no requestId. See the WebSocket overview for connecting.
Files up to 100 MB can be read or written. Binary content is base64-encoded; text is UTF-8.
Operations
Each request carries arequestId. On success the server replies with the same type and requestId; on failure it replies with type: "error" (see Errors).
read
Request
Response
write
Writes a file, creating parent directories as needed.
encoding is required and must be "utf8" or "base64". The response carries success, path, size, and modified.
list
Lists a directory. The response field is entries (not data).
Request
Response
name, type ("file" or "directory"), size, and modified.
stat
Metadata for a single path. The response is flat (no data wrapper) and uses fileType.
Request
Response
find-paths
Fuzzy path search across the workspace. Walks the tree, respects the repo’s ignore files, and applies the same ignore list as list.
Request
Response
Each match has
path and type ("file" or "directory").
mkdir, delete, rename
mkdir
delete
rename
mkdir and delete take path; rename takes oldPath and newPath. Each replies with success and the relevant path field(s).
Errors
When an operation fails, the responsetype is "error" (not the request type) and success is false. It carries a human-readable error, a machine-readable code, and the offending path when applicable.
code is one of:
Watcher Events
The server pushes file-system changes in real time. These have norequestId.
change
refresh
A signal to re-fetch the file tree, pushed after the agent or a git restore/revert rewrites files, and when the watcher overflows.
Ignored Paths
The watcher andlist skip these directory names: node_modules, .git, .venv, .next, .cache, dist, build, .turbo, __pycache__, .pytest_cache, coverage, .nyc_output. Listings also hide .DS_Store and lost+found.