Fundamentally the problem is our computational boundedness. Each time you try to spawn a new subtask, you risk losing track of the details of what spawned the process. If that subtask requires its own subtask, good luck finding your way back where you started without running out of working memory - and yet, this sort of mental operation happens a hundred times a day in "knowledge work" type jobs like coding.
These days I have a notepad where I write down actionable thoughts that I'm having as I work. Sort of expands and gives a bash history of my working memory. This is my current preferred solution after trying many different digital solutions.
I suspect this works because your brain experiences reinforcement from completing a task (small or big), and the longer you've been working without any kind of reinforcement, the more willpower you must expend to continue. (This is also my explanation for findings related to laughter being helpful for ego-depletion.) If my hypothesis is correct, if you could hack your internal sense of reinforcement, that could be another way around this problem (e.g. if you notice that you've been working on a task for a while without experiencing any external reinforcement, but it's a task that you endorse, you could think to yourself "man, I'm a pretty badass, determined person aren't I").
Since a lot of recent discussion has been about lowering the bar to posting links, this post about mini-tasks reminds me of this series of posts about using ultra short time boxes.
Basically the idea is to continually use a timer to do tasks that fit into roughly 60-90 seconds. The idea is developed over something like ten posts. (the blog in general is about language learning)
This is a slightly polished version of a draft I originally deemed not ready for posting, but given that people keep saying that the Discussion post quality bar is set unreasonably high, here it is.
Most of us have little aversion to doing something that we perceive as short and easy, even if it is not very interesting. If your English homework consisted of writing a one-line poem (this is actually a thing), you'd be less likely to put it off for later, even if writing poetry is one of your least favorite activities. We are certainly more likely to do something if we hate it less, shifting the balance between "should" and "want" toward want. To quote one of my three favorite Scott A's, the one with an unhealthy addiction to puns,
Just as drugs mysteriously find their own non-fungible money, enjoyable activities mysteriously find their own non-fungible time. If I had to explain it, I'd say the resource bottleneck isn't time but energy/willpower, and that these look similar because working hard saps energy/willpower and relaxing for a while restores it, so when I have less time I also have less energy/willpower. But some things don't require energy/willpower and so are essentially free.
And so there are various anti-akrasia proposals based on increasing the want/should ratio (or should it be the want-should difference?) by way of reduction of the perceived will power expenditure to accomplish a task, and/or sweeten it with a reward tacked-on, such as checking off an item on a to-do list and finishing pomodoros. These definitely work some time for some people, but the effect tends to wear off. As one of my coworkers described his attempt to switch from coffee to decaf, the body is fooled for the first few cups, but then it catches on and stops finding decaf enjoyable. (Your experience may vary.) The reason is probably related to the negative feedback, also known as punishment in the Skinner's operant conditioning model.
I think of many of these attempts to shorten/sweeten a should-task as "mini-tasking". It is also commonly known as "just putting one foot in front of the other" and "taking it day-by-day".
What I find hard is not the process of working through a completed set of mini-tasks, but actually breaking a large task down into small ones. So instead I tend to switch to a want-task (like writing this) from a should-task, like finding a bug in my code. I suspect that if I had a to-do list of bug finding in front of me, where, once I finish and check off each short item on the list, the larger project would be completed, I would be less inclined to take breaks for fun before feeling guilty and switching back to "work". Unfortunately, creating such a list is a non-trivial and fairly involved task in itself, so I rarely get it done, preferring instead to, say, just dive into the code and hope for the best.
If only I had a way to reflectively (reflexively?) mini-task, where no single action is perceived as long and/or tedious...