agent: fix failing test