The episode picks up sometime after the events of the midseason finale, when Castle was banned from the 12th precinct, and most of that time Castle spent in his pajamas.
In tonight’s season 7 mid-season finale of Castle, not only did Richard Castle become an honorary mobster, but that status then got him kicked out of helping the NYPD. That’s right: Castle is no longer welcome in the 12th precinct.