hammer out

Upper Intermediate (B2) neutral

To finally agree on or finish something after a lot of hard work and difficult discussion.

"After two days of intense talks, the two sides finally hammered out a peace agreement."