Watch A Directory
Event Model
Watch events are emitted as the filesystem changes. The current runtime watch stream includes event sequence numbers, operation types, and the affected path. The CLI prints them in this form:Resume From A Cursor
If you are consuming watch events from the CLI, you can resume from a known cursor:When To Use Watches
Use watches when you need to:- React to generated outputs.
- Detect file writes from background processes.
- Build tail-like workflows around a sandbox workspace.
- Feed change streams into higher-level orchestration.