Action callback middleware