File observer stops firing until BTT is restarted — 8 watched .txt files

Hi @Andreas_Hegenberg

I have a setup where BTT watches 8 plain .txt files for changes (modification) and reflects their contents in a floating menu. It works great ~90% of the time, but occasionally it stops updating completely and only a full BTT restart fixes it. I'd love your advice on whether this is expected, a known limitation, or if there's a better approach.

The setup:

  1. An external app writes/rewrites 8 names into 8 separate .txt files (one name per file) when that external app receives a sysex midi message

  2. In BTT I have a trigger that observes each of these 8 files (file/folder modification observer, not polling). When a file is modified, the trigger reads it and updates a BTT string variable.

  3. A floating menu that is always visible, displays those 8 variables.

The problem:

  • Sometmies (not very often), BTT stops updating the floating menu. When it fails, it fails for the whole group at once — none of the 8 variables update anymore, not just one.

  • I could not find any pattern. It seems random: not tied to idle/sleep, not tied to rapid write of the files, etc.

  • The external app keeps writing the files correctly during these episodes (verified), so the writing side is fine — it's the observing/reading side in BTT that seems to go silent.

  • The only way to recover is to quit and relaunch BTT. After a restart it works perfectly again until the next random episode.

My questions:

  1. Is observing 8 files at once a reasonable load, or could the file observers be getting deregistered / going to sleep under some condition?

  2. Would consolidating the 8 files into a single watched file likely help reduce these episodes?

  3. Is there any "watchdog" or self-healing option for file observers so I wouldn't need a manual restart?

Environment:

  • macOS 15.7.7 Sequoia

  • BetterTouchTool v6.594

  • Files are standard UTF-8 .txt, rewritten in place by the external app.

Thanks a lot for your help !

Mhh, do you know whether the watcher stops or the updating of the floating menus? 8 files should not cause any issues as this file watching is notification based. So no real CPU overhead.

If it happens you could try to export the debug logs and send them to me (andreas@folivora.ai), maybe they show something:

good question

I only notice that the floating menu is not refreshing the values, so I always assumed that the problem was in the observers part. I must check the values of the variables the next time it happens, and also send you the log. Maybe the observers are detecting correctly the files and changing the values of the vars correctly.