Your questions are good ones and are asked frequently. Let me begin by saying that filing bankruptcy can be a stressful experience. The competence of your lawyer should reduce your anxiety and get you focused on your goals, especially re-establishing your confidence in yourself.
It might also help you to learn that your right to have the benefit of U.S. Constitutionally founded “uniform bankruptcy laws” was born with the birth of our nation and were plainly established to benefit you.
The bankruptcy laws are complex and Congress has changed them on several occasions over the years to provide for changing times and circumstances. For most ordinary filers today, when a case is filed, a Trustee will be appointed by the Court to assume management of the Debtor’s property. It is common practice in a Chapter 7 case for the trustee to divert your refund (property) directly from the IRS on filing. A Chapter 13 case proceeds differently and unless the case is converted to a Chapter 7, the refund is not usually threatened.
So, the answer to your question is:
“If, as of filing your Chapter 7 case, you’ve not received your refund or you receive it after filing, the Trustee has a right to it and you will be held to account for it as for any other property of the estate, even if you have spent it.
Do you have other alternatives?
Yes, you do. If you received the refund before filing your Chapter 7 and you do not have it at the time of filing, what happened to it? This question is important, because the trustee has the right to set-aside certain transfers. Examples might be, if you paid a debt within 90 days before filing, the trustee may avoid the transfer as a “Preference” or, if you gave it to grandma the trustee may look back as much as two years to avoid the transfer as a “Fraudulent” transfer. However, spending the refund for ordinary living expenses or for necessities, would probably not be challenged by the trustee. Your lawyer will counsel with you in advance about the bankruptcy chapter you will be filing and offer suggestions regarding your refund use or maybe advise that you wait a while before filing.