The veteran has been largely on the outside since missing out on last year's home World Cup.
The home side dominated the afternoon session, but lost their way before the break.
New Zealand grabbed two wickets before the break to swing momentum their way before tea.
The spin allrounder could play his first test since 2021 if selected for Tuesday's series opener.
The team haven't won a test match in Bangladesh since 2008.
Fans can watch both tests live and free, starting Tuesday.
New Zealand will visit for four tests in the summer of 2026/27.
Five NZ players are now free agents for next month's auction, while five others have been retained.
But others have put the reaction own to sour grapes over another missed opportunity.