This is a known issue with cursor CLI. It currently also prints out the "thinking" of the agent and that messes with the output. Waiting for the Cursor team to fix it.