Budget agreement hinges on key legislation