Oil ended slightly higher overnight but remained below the session's early highs of above $US40 a barrel, the highest since March, retreating as doubts emerged about the timing and scale of a potential extension to the pact between OPEC and its allies to cut crude supplies.