Saving control inputs in RigidBodyDynamics

Is there a generally accepted way to store the control inputs during a simulation in RigidBodyDynamics?

ts, qs, vs = simulate(state, 15., control!; Δt = Δt);

I’d like to capture what is calculated by control! at each time step. control!'s function prototype looks like

function control!(control_inputs, t, state::MechanismState)

where control_inputs is calculated and modified inside control!. simulate uses control_inputs but then throws the values away and only returns the resulting motion of the system. I need to save control_inputs.

I can store into a global (or something) inside control!, but simulate uses a Runge–Kutta integrator, which gets called at intermediate time steps, so I end up with a vector 4x bigger than what I want.