Skip to content

File watchers for reactive session events #77

@evansenter

Description

@evansenter

Summary

Add file system watchers that emit events during a session, enabling reactive behavior when files change.

Use Cases

  • Test-driven development: Automatically re-run tests when source files change
  • Build monitoring: React to build output/errors as they occur
  • Log tailing: Surface relevant log entries during debugging
  • External tool integration: React to files written by other processes

Considerations

  • Watch scope: Which paths to watch, how to configure
  • Event filtering: Debouncing, ignoring irrelevant changes (node_modules, .git)
  • Session lifecycle: Start/stop watchers, cleanup on exit
  • Event integration: How watcher events feed into the agent loop

Implementation Options

  1. notify crate: Rust file system notification library
  2. Manual polling: Simpler but less efficient
  3. OS-specific: inotify (Linux), FSEvents (macOS), ReadDirectoryChangesW (Windows)

Status

🔮 Speculative - This is a future consideration for reactive/agentic workflows. Not needed for current interactive use cases.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions