The XY problem is a recurring failure mode in technical help-seeking, named and explained on its canonical reference page at xyproblem.info. It is defined there as “asking about your attempted solution rather than your actual problem,” and the page warns that it “leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.”
The pattern unfolds in a predictable sequence. A user wants to accomplish X. They do not know how to do X directly, but they believe that if they can just manage to do Y, they can assemble a solution from there. They do not know how to do Y either, so they ask for help with Y. Helpers try to assist with Y but are confused, because Y is a strange thing to want to do. After much back-and-forth, it finally emerges that the user really wanted X all along, and worse, that Y would not even have solved X.
The page offers a concrete example that has become the standard illustration. Someone asks how to extract the last three characters of a filename, because they want to determine the file’s type. Helpers can show them how to grab three characters, but it will not actually solve the real problem, because file extensions are not always three characters long. The fix the asker requested was never a correct route to the goal they had in mind, and time spent on it was time lost.
The XY problem entered the vocabulary of online technical communities, particularly Stack Overflow and IRC help channels, as a label experienced helpers could attach to a question to redirect it. The recommended remedy is simple to state and hard to practice: explain the actual goal, not just the step you are stuck on. Asking “I am trying to accomplish X; I thought Y might work but I am stuck” gives helpers the context to either fix Y or, more usefully, point out that Y is the wrong path and suggest a better one. The concept endures because the trap is so natural; people fixate on the solution they have imagined and lose the ability to step back and describe the problem in full.