agent: Fix option --debug-wait