As Conifold notes in a comment, if you made an assumption that you used to derive the conclusion, but you did not discharge that assumption, then you need to add that assumption to the premises.
Some (if not all) proof checkers will not allow you to proceed in that case, requiring that you restart the problem with new premises.
However, if you made assumptions that you did not need, that is, you did not need them to derive the goal, then you can consider the proof complete even with those assumptions not discharged. For example, consider this proof in the forallx proof checker:
I could have derived P from P on line 2 using reiteration (R) and referencing line 1. This would make for a shorter proof. However, I made some unnecessary assumptions, A on line 2, B on line 3, and C on line 4. I would not know how to discharge such assumptions even if I tried. I would have to start over if I were forced to discharge them. But all I have to do is derive P from line 1 on line 5. Since I did not use any of those three assumptions, but I only used the premise P to derive P, the proof checker reported: "This proof is correct."
Other proof checkers may behave differently, but I used only the premises I started with and so it seems reasonable for a proof checker to accept the proof at that point. Those three assumptions are like premises that I did not use.
P. D. Magnus, Tim Button with additions by J. Robert Loftis remixed and revised by Aaron Thomas-Bolduc, Richard Zach, forallx Calgary Remix: An Introduction to Formal Logic, Fall 2019. http://forallx.openlogicproject.org/forallxyyc.pdf