"Provi i fagioli."
Why can't this be 'Try the beans' just as 'Chiudi la finestra' accepts both 'You close the window' and 'Close the window'?
You are right, it can be "Try the beans" only. Let me explain you a couple of things of the imperative in Italian... :)
Provare (Imperativo) (ends with ARE)
Prova! (singular you - informal)
Provi! (singular, courtesy form)
Provate! (plural you)
Chiudere (Imperativo) (ends with ERE)
Chiudi! (singular you - informal)
Chiuda! (singular, courtesy form)
Chiudete! (plural you)
There is also an IRE ending, but many verbs are irregular, and I don't want to add too much mess! :)
To make a long story short
"Provi i fagioli." = could be imperative, but in courtesy form
"Chiudi la finestra." = could be imperative, but informal