One can imagine an agent-to-agent marketplace where agents publish and consume such memories, standardized by canonical references to the MCP tools they've used, and possibly put a price on it based on how much work it would take another agent to "discover" that useful computational path. Then the consuming agents can make a "build vs buy" decision.
The core issue is in creating meaningful notions of "context" across the universe of tasks and environments. I'm skeptical of embeddings for that reason, and I think reducing false positives/negatives for cache hits is more important than efficiency in the short term, so perhaps a rich textual description of the context is a good short term compromise.