It is bugged.
I’ve noticed that to circumvent the bug, you need to carry more materials than what’s required for a full repair. For example, to fully repair some tools you need 1 shaped wood and 15 bars. Make sure to have at least 2 shaped wood and 16 bars. Having less can cause the game to consume all of your materials and not replenish the proper amount of durability.
It’s never more than 15 bars for a full repair, just carry more than that when you actually do the repair to avoid the bug.
And like Nemesis mentioned, you can use thralls and work benches to reduce the repair costs. You can also use repair kits, which is actually the best way to go once you get up to the master repair kits.
There could be other repair bugs but this is the only one I’ve experienced.