coopth: make ctx handlers to take tid as arg