Delegates from more than 170 countries huddled for a week of marathon negotiations but came up short on delivering a treaty.