agent: agent test fixes