This is a good question... Not sure I have a good answer, but here ya go...
Can you adopt the concept of a timebox and goal/question to answer to help the research tasks complete and move the project forward?
You will never get the "best" answer" but spending a fixed amount of time for something like "see if there is existing code that will..." can help move it forward. Phrase it as "Decide to build from scratch or include a 3rd party library into the product to solve X, Y and Z" and give the activity 4 hours to make the call. Someone can grab the card, do the 4 hours of research and then make the decision. Once made, the next task should be to size the result of the decision (maybe that is included on the card? I've seen it both ways...)
Continuing the example... If you decide to build from scratch but don't know how to implements it, then similarly create a first task that is "create design sketch, 2 hours" Keep the timebox small and focus on moving to building something as soon as possible. If your team really doesn't know how to approach something, nothing teaches like experience.
Once you are progressing toward building and someone realizes "hey, I just read on Bob Loblow's Blog that there is already a solution to this..." then you can evaluate with the new information if it is cheaper/easier to switch or continue building from scratch.
- There is never such a thing as the perfect answer
- Build something ASAP
- Change direction when you have new information that compels you to
But I'm interested to hear more thoughts!