If I know where the error is (a script written by AI in powershell) and it's a logical one, it's ok to let the AI reason about it to get it fixed and move on.
If I have no clue about how this part of the system works, then it's worth reading closely what the error says, in order to understand it first, then have the agent check the assumption you have.
Reduce the friction by having the agent explain what happened and why the fix solved it. I know this might be an intellectual placebo, but sometimes you need to fix something fast to move on. Learning takes longer, and these days everyone expects you to be a 100x engineer with AI.