New York would become the first state in which counties could require homeowners to post warning flags alerting neighbors when they use pesticides on their lawns, under an agreement reached yesterday by Republican and Democratic leaders in the New York legislature. The measure would also mandate that parents be given notice 48 hours before spraying occurred at schools and day-care centers and it would give counties the option of requiring commercial lawn care companies to warn neighbors in writing 48 hours before spraying began. The agreement came days after state Attorney General Eliot L. Spitzer (D) released a report showing that schools around the state greatly overuse pesticides. The measure is expected to pass the legislature next week; Gov. George Pataki (R) hasn’t said whether he will sign it into law.