If I specify a command to ssh, sshd runs it in a non-interactive session.
This causes pluginhook to attach an stdin to the first plugin process, and thus to hang.
Running ssh with -t (eg ssh -t dokku@host logs) forces an interactive session whichs makes it work.
Alternatively running echo | ssh dokku@host logs works too.
If have no idea whether there is a simple fix to the problem.
The workaround above might be the only easy solution.