New prompts in the same session are dangerous because the undesired output (including nonsense reasoning) is getting put back into the context. Unless you’re brainstorming and need the dialogue to build up toward some solution, you are much better off removing anything that is not essential to the problem. If the last attempt was wrong, clear the context, feed in the spec, what information it must have like an error log and source, and write your instructions.