AggConfig object not found

I've more informations about my issue. It's happen when my custom plugin has only one bucket define in the schema. I patch the kibana code to handle this case.

It's a bug of kibana or it's something expected ?