We discussed this again on IRC yesterday, see logs here: https://logs.guix.gnu.org/guile/2022-09-21.log#120814
We realised that the *real* underlying issue is that false-if-exception is not working in the context of my test code, i.e. when another exception handler is set up. See further info here: https://issues.guix.gnu.org/57095#5 It would still be possible to work around the immediate issue by modifying terminal-width to check the return value of getenv instead of catching the exception in string->number. However the underlying issue will be difficult to solve.