[runmode addon] Pass state object to callbacks

Issue #1824