Having a separate planning / research phase helps with this. Make the LLM curate a plan by gathering internal and external context. Then execute the plan in another fresh session. Of course if the planning phase itself ends up in the local min then I would just start a new planning session with the learnings.
This is conversational momentum due to the autoregressive nature of models. Each token is drawn from a probability distribution conditioned on the preceding tokens. The best method I know of working around this is to request and curate a markdown export package from a conversation that is used to prime a new conversation in a clean context.
I have found that in such situations all one needs to do is ask "are you sure x is y" atleast as far as most Claude models go. That usually results in and apology and and escape from your local min.