Sounds like https://en.wikipedia.org/wiki/Cowboy_coding
>.<
Best advice might be to double-down on putting everything you're doing in the issue tracker and tying to commits. Don't get lumped into the "problem" when "why aren't we executing?" gets raised. Focus, ship & get credit for your work that gets shit done.
But the conditions were also kinda special. I was the junior, with him having close to 15 years of experience. We were only 2 in the office. The rest of the team being in another country.
So I was basically the only one to see the code. And he would listen to me, being the junior. So I requested not to work anymore, not being able to bear the situation.
In the end, he worked alone :S