Independent special schools and local authorities, which supply the bulk of their pupils, have agreed to work more closely on the fees that are charged.
The Convention of Scottish Local Authorities has complained bitterly about well-above inflation fee hikes that can run to thousands of pounds on individual pupils and recommended that member councils pay no more than the going rise of 2.5 per cent.
Some have broken the guidance because they have few options for particularly difficult children.
After lengthy talks with the Scottish Independent Special Schools Group a final and "detailed protocol" should be signed within three months, ending years of protracted bitterness.
Authorities still depend on the specialist services offered by the independent sector and want to exercise more control over fees and quality of service.
Norman Murray, Cosla's president, said: "Too often in the past, there have been tensions between councils and schools, particularly over the costs of the services required. While both sides sought what was best for the children and young people in their care, the differing financial constraints under which each side operated often led to problems."
David Henderson, Cosla's head of policy development, said: "This agreement makes it clear where we ae both coming from. It's a starting point which hopefully will help build trust. In the past, issues have been muddied."
For the schools, Phil Barton, group chairman and head of Starley Hall School in Burntisland, Fife, described the agreement as a "significant step forward" in ensuring the long-term development of a high quality service.
The schools have argued that they are in the market-place and should be free to charge what they want but councils have countered that they are the main customers and should have an input. Cosla is now pressing for the schools to justify their fee increases.
In a joint memorandum of understanding, the authorities and the schools agree that services must be explicit and that any proposed increases in fees should be fully explained and agreed in advance. Councils must also say clearly what they want.
Cosla, however, accepts that the schools are independent organisations responsible for their own finances and that fees have to cover all spending.
"Independent special schools will also be governed by the need to satisfy HMI inspections and to meet the appropriate national care standards and will require from time to time to incur expenditure and take other steps as are necessary to ensure their continued viability," the memo states.
Stricter regulations on child welfare and protection are forcing schools to improve amenities.