I guess if you tell codex to build a transpiler from a subset of python to brainfuck, then solve in that subset of python, it would work much better. Would that be cheating?
Doing something like that is basically the only way to write unlambda: you start with a lambda calculus (or scheme or whatever) and reduce the lambdas away mechanically. (This is in the unlambda docs!)