agent: [mock] fix reference errors