Wooden window sashes tend to rot. There are special hardening and filler materials that can do a good job of restoring this wood without having to replace it -- also good for the bottom of door frames.
A wood hardener is the starting point, to solidify existing soft wood and prepare the area for a filler. Minwax makes a one part wood hardener. BCS makes a two part epoxy wood hardener. Both are very liquid, not putties. The BCS product is the only one I know that will penetrate moist wood, up to 18" deep for log cabins. Rather that being repelled by the water, it mixes with it and penetrates completely. Minwax now claims good penetration as well.
Once the mould is killed and the soft wood is solidified, any missing wood can be replaced with epoxy fillers. Minwax makes an epoxy filler called Wood Filler (not to be confused with a true pore filler) which is very similar to an autobody filler but a pine colour. BCS makes an epoxy filler that stronger than the wood it replaces, specifically designed to adhere to their epoxy penetrating sealer. Neither are inexpensive. Follow this link for more details on the BCS product.
Minwax products are available in most renovation centres -- although you may have to special order the hardener. Smith & Co. make and distribute the BCS product with local distributors scattered around the world.
A unique use for these is to repair rotten joists under toilets. The Minwax hardener will kill all the fungus and stop all changes in the wood allowing for sistering other joists to the side of the rotten ones. The BCS product properly applied can even restore the origional joist to its previsous strength.
Follow this link for details and working techniques when working with these penetrating epoxies.