Yeah it’s a known bug (GitHub issue 212), but it’s on hold because of the large autograd refactor going on right now. Sorry for that.
Yes, you should never modify any arguments given to the hook in-place. If you want to replace grad input, you can do out-of-place operations on it, and return new values from the hook.