You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace polling with fsnotify for real-time file watching
Use OS-native filesystem notifications (inotify/kqueue/FSEvents) via
fsnotify instead of polling JSONL files every 500ms. Falls back to
polling when fsnotify is unavailable (NFS, cross-FS WSL2). Debounces
rapid writes with a 50ms coalesce window. Adds 11 new tests covering
fsnotify integration, debounce behavior, and polling fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ claude-esp
63
63
|`-n`| Start from newest (skip history, live only) |
64
64
|`-l`| List recent sessions |
65
65
|`-a`| List active sessions (modified in last 5 min) |
66
-
|`-p <ms>`| Poll interval in milliseconds (default 500)|
66
+
|`-p <ms>`| Poll interval in ms (fallback mode only, default 500) |
67
67
|`-v`| Show version |
68
68
|`-h`| Show help |
69
69
@@ -136,10 +136,12 @@ Background task outputs are stored in:
136
136
The watcher:
137
137
138
138
1. Discovers active sessions (modified in last 5 minutes)
139
-
2. Polls JSONL files every 500ms for new content
140
-
3. Parses JSON lines and extracts thinking/tool_use/tool_result
141
-
4. Discovers background tasks and correlates them with spawning agents
142
-
5. Renders them in a TUI with tree navigation and filtering
139
+
2. Uses OS-native filesystem notifications ([fsnotify](https://github.com/fsnotify/fsnotify)) to detect file changes in real-time (inotify on Linux, kqueue/FSEvents on macOS)
140
+
3. Falls back to polling (configurable with `-p`) on filesystems that don't support notifications (NFS, some cross-FS WSL2 setups)
0 commit comments