The Mishna on daf 24b listed people who are disqualified as witnesses in a Jewish court, because they are involved in activities that are forbidden by the Sages. Included in the list were soḥarei shevi’it – those who market produce from the Sabbatical year. Rabbi Shimon distinguished between osfei shvi’it – those who gather produce from the Sabbatical year – and soḥarei shevi’it – those who market that produce.
The Gemara on today’s daf explains that originally both osfei shvi’it and soḥarei shevi’it were disqualified as witnesses, but because of the establishment of arnona – special taxes levied by the authorities – the poor had no choice but to gather crops even during the Sabbatical year. In fact, the Gemara relates that Rabbi Yannai announced that farmers could sow on the Sabbatical year in order to be able to pay arnona. For that reason the Mishna rules that osfei shvi’it are not disqualified as witnesses in court; only soḥarei shevi’it would be disqualified.
There are those who limit this ruling only to places where – or only according to opinions that – the Sabbatical laws are rabbinic in our day and age. From the Talmud Yerushalmi it appears, however, that even if the laws still have biblical authority, nevertheless they would have been permitted if the situation was deemed to be piku’aḥ nefesh – a possible threat to life. Even though the ruling of the Sages ordinarily forbade Jews from publicly abrogating a mitzva, even if it meant risking their lives, that would not be true in this case where the intent of the non-Jewish government was solely for their own monetary benefit and had no anti-religious goal at all.
It is likely that in places where the Sabbatical year was kept as Torah law only minimal work was permitted – just enough to fulfill the requirements of the king.