Extract shared_context