I would say it mostly comes naturally to me to either stick with the project or the context. I guess it's intuition again, choosing the path with least time and energy wasted on switching focus. What I mean by that is, moving from one project to another in the same context requires energy and time in the changeover, just as moving from one context to another will. At my desk in the office, I will have a telephone available, and making a phone call can hardly even be called changing contexts - however, if I need to walk to another part of the office to talk to someone, it is, and then I would need to balance that against the time and energy wasted in the changeover (both for switching from the current project to another, and then to restart the project again later in that other context).
In practice, this means that I tend to follow through with more complicated projects even if context switching is required, since the cost of stopping and starting again on the project is bigger than the cost of changing contexts. For smaller stuff I work more or less exclusively by context. The latter is also true for @Agenda and @Errands, since there, the cost of changing contexts is often so much larger that it outweighs any benefit of not changing projects.