This is InactivePanes, not File History
Use Settings.add_on_change as it is supposed to

I've been using it wrong for the past 2 years ...
Use a 100% unique key for registering callback