diff --git a/codex-rs/execpolicy2/src/parser.rs b/codex-rs/execpolicy2/src/parser.rs index d18ce06d35..bb1ef5f746 100644 --- a/codex-rs/execpolicy2/src/parser.rs +++ b/codex-rs/execpolicy2/src/parser.rs @@ -93,7 +93,10 @@ fn parse_pattern_token<'v>(value: Value<'v>) -> Result { value .unpack_str() .ok_or_else(|| { - Error::InvalidPattern("pattern alternative must be a string".to_string()) + Error::InvalidPattern(format!( + "pattern alternative must be a string (got {})", + value.get_type() + )) }) .map(str::to_string) })