In some situations, trying to solve a problem uncovers another problem. Attempts to fix that uncover yet another. A few more rounds and one can be doing something seemingly completely unrelated to the main problem. Is there an expression for that?
You’ve gone down a rabbit hole.
The idiomatic expression, a "rabbit hole" is a reference to Lewis Carroll's "Alice in Wonderland". Its modern meaning is a detour from your work efforts that will require a great deal of time and analysis, while producing no useful result. It is a dead end or a fool's errand. A June 4, 2015 article in the New Yorker magazine recounts the evolution of the phrase over time.
I suppose you could say you got off in the weeds. I can't find any authority for this but it's a common enough expression. The implication is that you've wandered off the main path.
In such a situation, we can say that one lost sight of the main problem.
To no longer be able to see someone or something due to increased distance from them or it or an obstruction of the view.
We lost sight of the ground as the plane moved higher into the sky.
To forget about or neglect to focus on something.
I know you've had some setbacks recently, but try not to lose sight of the goal you want to achieve.
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
[COMMON] If you lose sight of an important aspect of something, you forget about it or ignore it.
They seem to have lost sight of their original objectives.
Collins COBUILD Idioms Dictionary, 3rd ed. © HarperCollins Publishers 2012
In software and programming circles, this is an incredibly common situation to be in and is usually known as yak shaving:
- Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem.
- A less useful activity done consciously or subconsciously to procrastinate about a larger but more useful task.
My wife calls this a “give a mouse a cookie” moment, because if you give a mouse a cookie, he’ll want a glass of milk.
This comes from the children’s book If You Give a Mouse a Cookie where, as described in Wikipedia:
A boy gives a cookie to a mouse. The mouse asks for a glass of milk. He then requests a straw (to drink the milk), a mirror (to avoid a milk mustache), nail scissors (to trim his hair in the mirror), and a broom (to sweep up his hair trimmings). Next he wants to take a nap, have a story read to him, draw a picture, and hang the drawing on the refrigerator. Looking at the refrigerator makes him thirsty, so the mouse asks for a glass of milk. The circle is complete when he wants a cookie to go with it.