A London agency may get a lifeline from the city for shelter beds on the verge of closing in the middle of winter.