Whenever cf-agent is executed from cf-runagent, there is a hardcoded "-D cfruncommand" argument passed, that sets the @cfruncommand@ class.
This class is not set when using
<pre>cf-runagent -D custom_class</pre>
This boils down to a cf-agent bug: only the last @-D@ argument is taken into consideration. The previous ones are overwritten (and some memory is leaked because of this as well).