Republican and White House negotiators are moving closer to an agreement to raise the debt limit and cap federal spending for two years, according to people familiar with the matter, as time grows short to avert a catastrophic US default.