When the input variable is numeric and there are values that do not appear in the codelist the code that executes on line 187 throws an error rather than generating the cli warning. This is because it cannot determine the length to use for the glue substitution (i.e., value{?s}).
The cli call requires the use of qty() prior to each instance of glue substitution. See codelists.R line 284-289 for an example of how this should look like.
Reproducible example
create_var_from_codelist_bug.txt